优化返回代码
This commit is contained in:
parent
367fbe9c7c
commit
95719e57d9
|
|
@ -104,9 +104,15 @@ export default {
|
||||||
onClick() {
|
onClick() {
|
||||||
if (this.customBtn) {
|
if (this.customBtn) {
|
||||||
this.$emit("onClickBtn");
|
this.$emit("onClickBtn");
|
||||||
|
} else {
|
||||||
|
if (getCurrentPages().length < 2) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: "/pages/index/index",
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.navigateBack({ delta: 1 });
|
uni.navigateBack({ delta: 1 });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
changeCity() {
|
changeCity() {
|
||||||
console.log("修改城市");
|
console.log("修改城市");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue