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 + }; +