优化返回代码

This commit is contained in:
TOP糯米 2023-04-03 11:01:04 +08:00
parent 700ee30bfb
commit 4e4157286f
1 changed files with 1 additions and 6 deletions

View File

@ -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",
});