diff --git a/coupon/details.html b/coupon/details.html
index 07fde40..32169c8 100644
--- a/coupon/details.html
+++ b/coupon/details.html
@@ -554,7 +554,7 @@
let data = {
"token": localStorage.getItem('token'),
"key": localStorage.getItem('key'),
- "code_batch_id": this.goodsDetail.coupon.code_batch_id || this.goodsDetail.code_batch_id,
+ "code_batch_id": this.goodsDetail.coupon&&this.goodsDetail.coupon.code_batch_id||this.goodsDetail.code_batch_id,
"goods_id": this.goodInfo.goods_id,
"account": this.account || '888888', /* 卡密时默认账号 */
"pay_type": payType == 2 ? 1 : 5,
diff --git a/paysuccess.html b/paysuccess.html
index dcc40c0..d90c85f 100644
--- a/paysuccess.html
+++ b/paysuccess.html
@@ -1,15 +1,11 @@
-
-
+
支付成功
-
-
+
+
@@ -39,7 +35,7 @@
-
@@ -55,10 +51,12 @@
show: false,
title: '温馨提示',
status: 3,/*1 成功 2提示 3失败 */
- text: '错误信息'
+ text: '错误信息',
+ bottomText:''
},
plaflam: 1,
payResult:false,
+ copyLink:'',
redirect_url: '' //微信小程序链接
};
},
@@ -126,20 +124,49 @@
openTipDialog(popUpAttr) {
this.popAttr = popUpAttr;
},
- /* 弹框回调,点击按钮触发 */
- backFunctionPop() {
- this.popAttr.show=false;
+ /* 弹窗回调 */
+ backFunctionPop (type) {
+ if (this.popAttr.bottomText === '点击复制' && type) {
+ var aux = document.createElement("input");
+ aux.setAttribute("value", this.copyLink);
+ document.body.appendChild(aux);
+ aux.select();
+ document.execCommand("copy");
+ document.body.removeChild(aux);
+ this.openTipDialog({
+ show: true,
+ title: '温馨提示',
+ status: 1,/*1 成功 2提示 3失败 */
+ text: '复制成功'
+ });
+ }
+
+ if (this.isLogin) {
+ this.delayedOut()
+ }
},
- toLinkAlipay() {
+ toLinkAlipay () {
//支付宝H5跳转
let self = this;
let banklink = encodeURIComponent(
- window.location.origin +
- "/alipay.html?orderNumber=" + this.orderNumber
+ window.location.origin +
+ "/alipay.html?orderNumber=" + this.orderId
);
let link = "http://openapi.1688sup.com/alipay/oauth?jump=" + banklink;
let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
- window.location.replace(link);
+ if (ua.match(/MicroMessenger/i) == "micromessenger") {
+ //复制链接地址,提醒去浏览器打开
+ this.copyLink = link;
+ this.openErrorDialog(`请复制链接,在其他浏览器打开`, '点击复制')
+ } else {
+ //唤起支付宝
+ window.location.replace(link);
+ }
+ },
+ openErrorDialog (tip, bottomText) {
+ this.popAttr.text = tip
+ this.popAttr.show = true
+ this.popAttr.bottomText = bottomText
},
//领取立减金
receiveFn() {
@@ -159,18 +186,8 @@
}
if (this.plaflam == 2) {
//微信
- if (ua.indexOf("dingtalk") > -1) {
- //在钉钉内置环境打开,不能唤起微信小程序
- this.openTipDialog({
- show: true,
- title: '温馨提示',
- status: 2,/*1 成功 2提示 3失败 */
- text: '请在其他浏览器打开'
- });
- } else {
//唤起微信福利官小程序
window.location.replace(this.redirect_url);
- }
}
}
},