调整返回上一页地址

This commit is contained in:
red-deng-deng 2022-01-24 11:55:00 +08:00
parent 431fec2942
commit ee2009702c
3 changed files with 9 additions and 7 deletions

View File

@ -179,7 +179,7 @@
if(goodsCount>1){
window.location.replace(document.referrer);
}else{
window.history.go(-2);
history.go(-2);
}
// window.location.replace(document.referrer);
},
@ -300,7 +300,10 @@
window.location.replace(document.referrer);
}, 3000);
}else{
window.history.go(-2);
let backUrl=window.history.length;
if(backUrl){
history.go(-backUrl+1);
}
}
}
}

View File

@ -254,9 +254,11 @@
this.gstatus = item.available;
},
backgoodsFn() {
window.history.back();
let backUrl=window.history.length;
if(window.history.length){
history.go(-backUrl+1);
}
},
// 单条弹框
openDialog() {
this.promtshow = true;
@ -274,7 +276,6 @@
"last_product_id": sessionStorage.getItem('lastid') | 0,
}
if (showType == 1) { //白名单
let tokenList = JSON.parse(sessionStorage.getItem('getTokenList'));
let goodsList = [];
for (item of tokenList) {

View File

@ -138,7 +138,6 @@
if(linkId.length>10){
req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => {
if(res.code==200){
console.log('开始跳转');
window.location.href=res.data;
return;
}
@ -176,7 +175,6 @@
self.maskshow = true;
self.tiptext = res.message;
self.popboxshow = true;
}
}).catch(err => {
self.maskshow = true;