优化返回代码
This commit is contained in:
parent
700ee30bfb
commit
4e4157286f
|
@ -44,7 +44,6 @@ export default {
|
||||||
headerHeight: 0,
|
headerHeight: 0,
|
||||||
statusBarHeight: 0,
|
statusBarHeight: 0,
|
||||||
bodyPaddingTop: 0,
|
bodyPaddingTop: 0,
|
||||||
backType: "back",
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
@ -107,10 +106,6 @@ export default {
|
||||||
if (this.showHeader) {
|
if (this.showHeader) {
|
||||||
this.bodyPaddingTop = safePaddingTop;
|
this.bodyPaddingTop = safePaddingTop;
|
||||||
}
|
}
|
||||||
const pages = getCurrentPages();
|
|
||||||
if (pages.length < 2) {
|
|
||||||
this.backType = "home";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -118,7 +113,7 @@ export default {
|
||||||
if (this.customBtn) {
|
if (this.customBtn) {
|
||||||
this.$emit("onClickBtn");
|
this.$emit("onClickBtn");
|
||||||
} else {
|
} else {
|
||||||
if (this.backType == "home") {
|
if (getCurrentPages().length < 2) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/index/index",
|
url: "/pages/index/index",
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue