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 friends-page">
|
||||
<view class="page-container friends-page">
|
||||
<!-- 顶部导航 -->
|
||||
<view class="friends-nav" :style="{ paddingTop: navPaddingTop }">
|
||||
<view class="friends-nav-inner">
|
||||
@@ -96,10 +96,8 @@ import FriendItem from '../../components/FriendItem.vue'
|
||||
import EmptyState from '../../components/EmptyState.vue'
|
||||
import { GetFriends, GetFriendRequests, AcceptFriendRequest, RemoveFriend } from '../../common/api'
|
||||
import { savePendingInvite, handlePendingInvite, getMyInviteCode } from '../../common/invite'
|
||||
import themeMixin from '../../common/theme-mixin'
|
||||
|
||||
export default {
|
||||
mixins: [themeMixin],
|
||||
components: { FriendItem, EmptyState },
|
||||
data() {
|
||||
const menuBtn = uni.getMenuButtonBoundingClientRect()
|
||||
@@ -204,13 +202,13 @@ export default {
|
||||
const parts = []
|
||||
if (this.inviteCode) parts.push(`inviteCode=${encodeURIComponent(this.inviteCode)}`)
|
||||
if (user.nickname) parts.push(`inviterNick=${encodeURIComponent(user.nickname)}`)
|
||||
const query = parts.length ? `?${parts.join('&')}` : ''
|
||||
const query = parts.length ? `&${parts.join('&')}` : ''
|
||||
const nick = user.nickname ? `「${user.nickname}」` : ''
|
||||
// 本次分享已用掉当前邀请码,异步生成新码供下次分享
|
||||
this.refreshInviteCode()
|
||||
return {
|
||||
title: `${nick}邀请你成为酒友,一起记录饮酒生活 🍻`,
|
||||
path: `/pages/index/index${query}`
|
||||
path: `/pages/main/main?tab=0${query}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user