diff --git a/coupon/details.html b/coupon/details.html index 24bb63e..84a3d36 100644 --- a/coupon/details.html +++ b/coupon/details.html @@ -221,7 +221,8 @@ popStatus: 1, /*1 成功 2提示 3失败 */ bottomText: '', /* 复制按钮 */ href: '',/* 支付地址 */ - receive_time: {} + receive_time: {}, + isLogin: false,/* 是否跳登录页 */ } }, @@ -333,8 +334,8 @@ }, /* 弹窗回调 */ - backFunctionPop (data) { - if (this.bottomText === '点击复制' && data) { + backFunctionPop (type) { + if (this.bottomText === '点击复制' && type) { var aux = document.createElement("input"); aux.setAttribute("value", this.href); document.body.appendChild(aux); @@ -344,13 +345,7 @@ this.openDialog('复制成功') } - if (data === 'couponCollection') { - setTimeout(() => { - window.location.replace('./couponCollection.html'); - }, 3000); - } - - if (data === 'entryLink') { + if (this.isLogin) { /*跳转起始页面*/ let entryLink = localStorage.getItem('entryLink'); setTimeout(() => { @@ -438,11 +433,7 @@ } else { this.openErrorDialog(res.message); if (res.code == 403) { - if (goodsCount > 1) { - this.backFunctionPop('couponCollection') - } else { - this.backFunctionPop('entryLink') - } + this.isLogin = true } } }).catch(err => {