fix: 在页面加载时统一隐藏首页按钮
在多个页面的onLoad生命周期中添加this.$util.hideHomeButton()调用,确保页面加载时即隐藏首页按钮,避免显示不一致问题。同时调整category.vue中onShow的逻辑顺序。
This commit is contained in:
@@ -30,15 +30,14 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.$util.hideHomeButton();
|
||||||
//刷新多语言
|
//刷新多语言
|
||||||
this.$langConfig.refresh();
|
this.$langConfig.refresh();
|
||||||
|
|
||||||
uni.hideTabBar();
|
|
||||||
this.getDiyInfo();
|
this.getDiyInfo();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (this.$refs.category) this.$refs.category[0].pageShow();
|
|
||||||
this.$util.hideHomeButton();
|
this.$util.hideHomeButton();
|
||||||
|
if (this.$refs.category) this.$refs.category[0].pageShow();
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
if (!this.storeToken && this.$refs.login) this.$refs.login.cancelCompleteInfo();
|
if (!this.storeToken && this.$refs.login) this.$refs.login.cancelCompleteInfo();
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
this.$util.hideHomeButton();
|
||||||
this.$langConfig.refresh();
|
this.$langConfig.refresh();
|
||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
url: '/api/member/personnel',
|
url: '/api/member/personnel',
|
||||||
|
|||||||
@@ -86,6 +86,9 @@ export default {
|
|||||||
nsNewGift
|
nsNewGift
|
||||||
},
|
},
|
||||||
mixins: [diyJs, indexJs],
|
mixins: [diyJs, indexJs],
|
||||||
|
onLoad() {
|
||||||
|
this.$util.hideHomeButton();
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.$util.hideHomeButton();
|
this.$util.hideHomeButton();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user