优化返回代码
This commit is contained in:
parent
700ee30bfb
commit
4e4157286f
|
@ -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",
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue