diff --git a/src/components/layout/layout.vue b/src/components/layout/layout.vue index 75bb09b..86eb6a0 100644 --- a/src/components/layout/layout.vue +++ b/src/components/layout/layout.vue @@ -44,7 +44,6 @@ export default { headerHeight: 0, statusBarHeight: 0, bodyPaddingTop: 0, - backType: "back", }; }, components: { @@ -107,10 +106,6 @@ export default { if (this.showHeader) { this.bodyPaddingTop = safePaddingTop; } - const pages = getCurrentPages(); - if (pages.length < 2) { - this.backType = "home"; - } }, mounted() {}, methods: { @@ -118,7 +113,7 @@ export default { if (this.customBtn) { this.$emit("onClickBtn"); } else { - if (this.backType == "home") { + if (getCurrentPages().length < 2) { uni.switchTab({ url: "/pages/index/index", });