refactor(common,components): 优化底部导航栏显隐逻辑
1. 新增isCurrentPageTabBarRoot工具方法封装页面判断逻辑 2. 调整弹窗打开时的导航栏隐藏时机,仅在非TabBar根页面执行 3. 移除弹窗open回调中的导航栏显示逻辑,改为在关闭弹窗时显式处理 4. 补充注释说明回调不可靠的问题和根页面不隐藏导航的原因
This commit is contained in:
@@ -237,6 +237,7 @@ export default {
|
||||
// 关闭登录
|
||||
closeLogin() {
|
||||
this.$refs.completeInfoPopup.close();
|
||||
this.$store.commit('setBottomNavHidden', false); // 显示底部导航
|
||||
},
|
||||
|
||||
// 获取注册配置
|
||||
@@ -346,10 +347,13 @@ export default {
|
||||
if (!this.storeToken) this.getCaptchaConfig();
|
||||
// #endif
|
||||
|
||||
this.$refs.completeInfoPopup.open(() => {
|
||||
this.$store.commit('setBottomNavHidden', false); //显示底部导航
|
||||
});
|
||||
this.$store.commit('setBottomNavHidden', true); //隐藏底部导航
|
||||
this.$refs.completeInfoPopup.open();
|
||||
// 关闭时(setBottomNavHidden=false)由 cancelCompleteInfo / forceBindMobile 显式处理,
|
||||
// 不在 open 回调里写 — 回调在"弹窗被销毁/页面被卸载"等异常路径下不保证触发,会卡住 TabBar 隐藏态
|
||||
// TabBar 根页面(如会员中心)不能藏 TabBar — 否则会被自己藏起来
|
||||
if (!this.$util.isCurrentPageTabBarRoot()) {
|
||||
this.$store.commit('setBottomNavHidden', true); //隐藏底部导航
|
||||
}
|
||||
},
|
||||
|
||||
// 获取前台登录验证码开关配置
|
||||
|
||||
Reference in New Issue
Block a user