fix:修复商品详情仅登录失效跳登录

This commit is contained in:
wangsongsole 2022-10-17 11:37:12 +08:00
parent c45dce57e0
commit 67833a427e
1 changed files with 6 additions and 15 deletions

View File

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