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失败 */
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 => {