refactor(app): 重构应用主题和页面结构
- 移除动态主题切换功能,改为全局统一深色主题 - 实现自定义TabBar组件替换原生tabBar,解决iOS闪白问题 - 创建main容器页面统一管理三个tab页面的生命周期和状态 - 将所有页面的onShow/onHide等生命周期方法迁移到子组件内部 - 更新页面路径从index改为main,并调整路由跳转逻辑 - 移除theme-mixin和相关主题工具函数 - 统一页面背景色设置,优化用户体验一致性
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :class="themeClass" class="page-container login-page">
|
||||
<view class="page-container login-page">
|
||||
<!-- 顶部品牌区 -->
|
||||
<view class="brand-area">
|
||||
<view class="brand-glow"></view>
|
||||
@@ -94,13 +94,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import themeMixin from '../../common/theme-mixin'
|
||||
import client, { saveAuthTokens, UploadImage, UpdateUserAvatar } from '../../common/api'
|
||||
import { handlePendingInvite } from '../../common/invite'
|
||||
import wsManager from '../../common/websocket'
|
||||
|
||||
export default {
|
||||
mixins: [themeMixin],
|
||||
data() {
|
||||
return {
|
||||
showNotice: true,
|
||||
@@ -114,7 +112,7 @@ export default {
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '碰盏日记 - 让每一杯酒都有迹可循',
|
||||
path: '/pages/index/index'
|
||||
path: '/pages/main/main?tab=0'
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
@@ -132,7 +130,7 @@ export default {
|
||||
enterGuest() {
|
||||
uni.setStorageSync('is_first_launch', 'false')
|
||||
uni.setStorageSync('is_guest', 'true')
|
||||
uni.switchTab({ url: '/pages/index/index' })
|
||||
uni.reLaunch({ url: '/pages/main/main?tab=0' })
|
||||
},
|
||||
|
||||
// ===== 微信新规范:头像选择 =====
|
||||
@@ -282,7 +280,7 @@ export default {
|
||||
} catch (e) {
|
||||
console.warn('补发邀请失败,不影响登录:', e)
|
||||
}
|
||||
uni.switchTab({ url: '/pages/index/index' })
|
||||
uni.reLaunch({ url: '/pages/main/main?tab=0' })
|
||||
},
|
||||
|
||||
// ===== 协议查看:跳转协议页(user=用户协议 / privacy=隐私政策)=====
|
||||
|
||||
Reference in New Issue
Block a user