refactor: 🐛 优化部分代码逻辑

This commit is contained in:
学习很差啦
2022-09-30 09:58:08 +08:00
parent aa8fc523df
commit eb0faad7ec
2 changed files with 21 additions and 13 deletions

View File

@@ -98,18 +98,18 @@
},
onBackPress(e) {
if (e.from == "backbutton") {
if(this.routerVal.recharge_sn){
uni.switchTab({
url: '/pages/tabbar/user/my'
});
}
else{
uni.redirectTo({
url: "/pages/order/myOrder?status=0",
});
}
return true; //阻止默认返回行为
}
if(this.routerVal.recharge_sn){
uni.switchTab({
url: '/pages/tabbar/user/my'
});
}
else{
uni.navigateTo({
url: "/pages/order/myOrder?status=0",
});
}
return true; //阻止默认返回行为
}
},
mounted() {
this.cashierData();