优化返回代码

This commit is contained in:
TOP糯米 2023-04-03 11:02:07 +08:00
parent 367fbe9c7c
commit 95719e57d9
1 changed files with 7 additions and 1 deletions

View File

@ -105,7 +105,13 @@ export default {
if (this.customBtn) {
this.$emit("onClickBtn");
} else {
uni.navigateBack({ delta: 1 });
if (getCurrentPages().length < 2) {
uni.switchTab({
url: "/pages/index/index",
});
} else {
uni.navigateBack({ delta: 1 });
}
}
},
changeCity() {