From 4e9de1454eddac9a3819d4de59bbf6fc9bd24f5e Mon Sep 17 00:00:00 2001 From: ctw Date: Wed, 10 Dec 2025 11:18:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=9A=84=E6=9D=A1=E4=BB=B6=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 5 +- src/pages/home/detail.vue | 3 +- src/pages/login/login.vue | 7 + src/pages/wechat-tabbar/index.vue | 463 ++++++++++++++++-------------- 4 files changed, 259 insertions(+), 219 deletions(-) diff --git a/src/App.vue b/src/App.vue index 93d9b8a7..81edd7ad 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,6 +21,7 @@ groupMessagesBuffer: [], }; }, + // #ifndef MP-WEIXIN methods: { init() { this.reconnecting = false; @@ -483,7 +484,7 @@ // #endif }, }, - /** ↑↑↑ 以上为app启动聊天相关模块初始化,WebSocket链接,加载聊天消息,加载离线消息,加载群组消息,初始化聊天相关的全局状态仓库 */ + // #endif onLaunch() { // 隐藏原生导航栏 使用自定义底部导航 @@ -511,6 +512,7 @@ }, }); + // #ifndef MP-WEIXIN this.$mountStore(); this.closeSplashscreen(1000); // 延迟1s,避免用户看到页面跳转 // 登录状态校验 @@ -525,6 +527,7 @@ // 跳转到登录页 uni.redirectTo({ url: '/pages/login/login' }); }); + // #endif }, onShow() { // #ifdef APP-PLUS diff --git a/src/pages/home/detail.vue b/src/pages/home/detail.vue index a96fd94f..01abbc23 100644 --- a/src/pages/home/detail.vue +++ b/src/pages/home/detail.vue @@ -155,9 +155,10 @@ diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index d595c74f..7a855c6b 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -121,8 +121,15 @@ const { code } = await AuthUtil.smsRegister({ mobile: phone.value, code: smsCode.value }); if (code === 0) { + // #ifdef MP-WEIXIN + uni.reLaunch({ url: '/pages/wechat-tabbar/index' }); + // #endif + + // #ifndef MP-WEIXIN uni.reLaunch({ url: '/pages/tabbar/home' }); getApp().$vm.init(); + // #endif + return; } // 清理数据,防止缓存未失效 diff --git a/src/pages/wechat-tabbar/index.vue b/src/pages/wechat-tabbar/index.vue index 9bd948fd..65298ea4 100644 --- a/src/pages/wechat-tabbar/index.vue +++ b/src/pages/wechat-tabbar/index.vue @@ -1,267 +1,296 @@ \ No newline at end of file + }; +