diff --git a/src/App.vue b/src/App.vue
index 97d11f5..202ea71 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -13,7 +13,7 @@ const conversationStore = useConversationStore()
function handleGlobalMessage(message: ChatMessage) {
// 忽略信令消息
if (message.message_type === 6) return
-
+
// 更新会话列表
const isSelf = message.sender_user_id === authStore.user?.id
conversationStore.handleMessageUpdate(message, isSelf, false)
@@ -23,7 +23,7 @@ function handleGlobalMessage(message: ChatMessage) {
async function initWebSocket() {
const userId = authStore.user?.id
if (!userId) return
-
+
try {
await wsManager.connect(userId)
// 注册全局消息处理器
@@ -44,7 +44,7 @@ onShow(async () => {
console.log('App Show')
// 检查登录状态
const isAuth = await authStore.checkAuth()
-
+
// 如果已登录,初始化 WebSocket
if (isAuth && authStore.user?.id) {
initWebSocket()
@@ -56,6 +56,11 @@ onShow(async () => {
@import '@/styles/variables.scss';
@import '@/styles/common.scss';
+/* 移除全局硬编码 padding,交由各页面 nav-bar 处理 */
+#app {
+ /* padding-top: calc(var(--status-bar-height) + 40rpx); REMOVED */
+}
+
/* 全局样式 */
page {
background-color: var(--bg-page);
@@ -64,11 +69,11 @@ page {
font-size: 28rpx;
line-height: 1.5;
- // wot-design-uni 主题色覆盖
- --wot-color-theme: #07c160;
- --wot-color-success: #07c160;
- --wot-color-danger: #fa5151;
- --wot-color-warning: #ffc300;
+ // wot-design-uni 主题色覆盖 (使用 CSS 变量)
+ --wot-color-theme: var(--color-primary);
+ --wot-color-success: var(--color-success);
+ --wot-color-danger: var(--color-danger);
+ --wot-color-warning: var(--color-warning);
}
/* 暗色模式下的 wot-design-uni 组件适配 */
diff --git a/src/pages/chat/index.vue b/src/pages/chat/index.vue
index 481338d..8ee2098 100644
--- a/src/pages/chat/index.vue
+++ b/src/pages/chat/index.vue
@@ -1,284 +1,260 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 点击或滑到顶部加载更多
-
-
- 没有更多消息了
-
-
-
-
+
+
+
-
-
- {{ formatMessageTime(msg.created_at) }}
-
-
-
-
- {{ msg.content }}
-
-
-
-
-
-
-
+
+
+ {{ displayName }}
+ {{ groupMembers.length }}
-
-
-
-
- {{ msg.content }}
-
-
-
-
-
-
-
- {{ msg.duration || 0 }}"
-
-
-
-
-
-
-
-
-
- {{ getFileName(msg) }}
- {{ formatSize(getFileSize(msg)) }}
-
-
-
-
- [未知消息类型]
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- 发送
-
-
+
+
+
+ 查看历史消息
+ 没有更多消息了
+
+
+
+
+
+ {{ formatMessageTime(msg.created_at) }}
+
+
+
+
+ {{ msg.content }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ getMessageSenderName(msg) }}
+
+
+
+ {{ msg.content }}
+
+
+
+
+
+
+
+
+
+
+ {{ msg.duration || 0 }}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ getFileName(msg) }}
+ {{ formatSize(getFileSize(msg)) }}
+
+
+
+ [不支持的消息]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 相册
+
+
+
+ 拍摄
+
+
+
+ 视频
+
+
+
+ 语音
+
+
+
+ 文件
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ pendingFile.name }}
+ {{ formatSize(pendingFile.size) }}
+
+
+
+
+
+
+
-
-
-
-
-
-
- 图片
-
-
-
- 视频
-
-
-
- 拍摄
-
-
-
- 文件
-
-
-
- 语音通话
-
-
-
- 视频通话
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ pendingFile.name }}
- {{ formatSize(pendingFile.size) }}
-
-
-
-
-
- {{ pendingFile.name }}
- {{ formatSize(pendingFile.size) }}
-
-
-
-
-
-
-
-
+
diff --git a/src/pages/contact/add.vue b/src/pages/contact/add.vue
index aec4605..8c30719 100644
--- a/src/pages/contact/add.vue
+++ b/src/pages/contact/add.vue
@@ -1,223 +1,344 @@
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
- 搜索中...
-
+
+
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
- {{ item.name }}
- ID: {{ item.id }}
+
+
+
- 添加
+
+
+
+ 正在寻找...
+
+
+
+
+ 🔍
+ 未找到匹配的用户
+
+
+
+
+
+
+
+ {{ item.name }}
+ ID: {{ item.id }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫一扫
+ 扫描二维码名片
+
+
+
+
-
-
-
-
-
-
- 扫一扫添加好友
-
-
-
-
+
+
+
+
diff --git a/src/pages/contact/detail.vue b/src/pages/contact/detail.vue
index 5200a0e..daa01f1 100644
--- a/src/pages/contact/detail.vue
+++ b/src/pages/contact/detail.vue
@@ -1,73 +1,100 @@
-
-
-
-
-
-
- 加载中...
+
+
+
-
-
-
+
@@ -75,236 +102,261 @@
diff --git a/src/pages/contact/groups.vue b/src/pages/contact/groups.vue
index 37d2a8f..3837617 100644
--- a/src/pages/contact/groups.vue
+++ b/src/pages/contact/groups.vue
@@ -1,135 +1,138 @@
-
-
-
- 加载中...
-
+
+
+
-
+
+
+
+ 加载中...
+
-
-
-
-
-
- {{ group.room_name?.charAt(0) || '群' }}
+
+
+
+
+
+
+
+
+ {{ group.room_name?.charAt(0) || '群' }}
+
+
+
+
+
+ {{ group.room_name }}
+
+ {{ getCategoryText(group.category) }}
+
+
+
+
-
-
-
+
+
-
-
-
- 创建群聊
+
+
+
+ 创建
+
-
+
diff --git a/src/pages/contact/index.vue b/src/pages/contact/index.vue
index a357ca2..2968fbf 100644
--- a/src/pages/contact/index.vue
+++ b/src/pages/contact/index.vue
@@ -2,31 +2,27 @@
-
+
-
-
-
重命名分组
@@ -213,9 +210,7 @@
-
-
修改备注
@@ -245,84 +240,18 @@ import AppAvatar from '@/components/common/AppAvatar.vue'
import AppTabBar from '@/components/common/AppTabBar.vue'
import type { Contact, ContactGroup } from '@/types/api'
-// 类型定义补全
-interface GroupChat {
- room_id: string; room_type: string; room_name: string; room_avatar: string; category: 'joined' | 'created' | 'managed';
-}
-
-const contactStore = useContactStore()
-const chatStore = useChatStore()
-const { isDark } = useTheme()
-const toast = useToast()
-const messageBox = useMessage()
-
-// 保持全部原有逻辑变量和方法不变
-const tabs = [{ key: 'groups', label: '分组' }, { key: 'friends', label: '好友' }, { key: 'chats', label: '群聊' }]
-const activeTab = ref('groups')
-const searchKeyword = ref('')
-const refreshing = ref(false)
-const loading = ref(false)
-const collapsedIds = ref<(number | string)[]>([])
-const contactGroups = ref([])
-const groupChats = ref([])
-const showContactActions = ref(false)
-const selectedContact = ref(null)
-const showMoveGroupModal = ref(false)
-const showRemarkModal = ref(false)
-const remarkName = ref('')
-const savingRemark = ref(false)
-const showGroupActions = ref(false)
-const selectedGroup = ref(null)
-const showCreateGroupModal = ref(false)
-const showRenameGroupModal = ref(false)
-const newGroupName = ref('')
-const renameGroupName = ref('')
-const creating = ref(false)
-const renaming = ref(false)
-
-const contacts = computed(() => chatStore.contacts)
-const friendRequestCount = computed(() => contactStore.friendRequests.filter(r => r.status === 'pending').length)
-const ungroupedContacts = computed(() => contacts.value.filter(c => !c.group_id || c.group_id === 0))
-function getGroupContacts(groupId: number): Contact[] { return contacts.value.filter(c => c.group_id === groupId) }
-const letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#']
-const alphabetGroupedContacts = computed(() => {
- const groups: Record = {}
- contacts.value.forEach(contact => {
- const name = contact.remark_name || contact.user?.name || ''
- const firstChar = name.charAt(0).toUpperCase()
- const letter = /[A-Z]/.test(firstChar) ? firstChar : '#'
- if (!groups[letter]) groups[letter] = []
- groups[letter].push(contact)
- })
- return Object.keys(groups).sort((a, b) => (a === '#' ? 1 : b === '#' ? -1 : a.localeCompare(b))).map(letter => ({ letter, contacts: groups[letter] }))
-})
-const createdGroups = computed(() => groupChats.value.filter(g => g.category === 'created'))
-const managedGroups = computed(() => groupChats.value.filter(g => g.category === 'managed'))
-const joinedGroups = computed(() => groupChats.value.filter(g => g.category === 'joined'))
-
-const contactActionItems = [{ name: '修改备注', value: 'remark' }, { name: '移动到分组', value: 'move' }, { name: '删除好友', value: 'delete', color: '#fa5151' }]
-const groupActionItems = [{ name: '重命名', value: 'rename' }, { name: '删除分组', value: 'delete', color: '#fa5151' }]
-const moveGroupActions = computed(() => {
- const actions: any[] = [{ name: '未分组', value: 0 }]
- contactGroups.value.forEach(g => { if (selectedContact.value?.group_id !== g.id) actions.push({ name: g.group_name, value: g.id }) })
- return actions
-})
-
-onMounted(() => loadData())
-onShow(() => loadFriendRequests())
-
-async function loadData() {
- loading.value = true
- try {
- const [contactList, groups, chats] = await Promise.all([contactApi.getContacts(), contactApi.getGroups(), roomApi.getUserGroups()])
- chatStore.setContacts(contactList)
- contactGroups.value = groups
- groupChats.value = chats || []
- } catch (error) { console.error(error) } finally { loading.value = false }
-}
+// --- 逻辑完全不变 ---
+interface GroupChat { room_id: string; room_type: string; room_name: string; room_avatar: string; category: 'joined' | 'created' | 'managed'; }
+const contactStore = useContactStore(); const chatStore = useChatStore(); const { isDark } = useTheme(); const toast = useToast(); const messageBox = useMessage();
+const tabs = [{ key: 'groups', label: '分组' }, { key: 'friends', label: '好友' }, { key: 'chats', label: '群聊' }]; const activeTab = ref('groups'); const searchKeyword = ref(''); const refreshing = ref(false); const loading = ref(false); const collapsedIds = ref<(number | string)[]>([]); const contactGroups = ref([]); const groupChats = ref([]); const showContactActions = ref(false); const selectedContact = ref(null); const showMoveGroupModal = ref(false); const showRemarkModal = ref(false); const remarkName = ref(''); const savingRemark = ref(false); const showGroupActions = ref(false); const selectedGroup = ref(null); const showCreateGroupModal = ref(false); const showRenameGroupModal = ref(false); const newGroupName = ref(''); const renameGroupName = ref(''); const creating = ref(false); const renaming = ref(false);
+const contacts = computed(() => chatStore.contacts); const friendRequestCount = computed(() => contactStore.friendRequests.filter(r => r.status === 'pending').length); const ungroupedContacts = computed(() => contacts.value.filter(c => !c.group_id || c.group_id === 0)); function getGroupContacts(groupId: number): Contact[] { return contacts.value.filter(c => c.group_id === groupId) }
+const letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#']; const alphabetGroupedContacts = computed(() => { const groups: Record = {}; contacts.value.forEach(contact => { const name = contact.remark_name || contact.user?.name || ''; const firstChar = name.charAt(0).toUpperCase(); const letter = /[A-Z]/.test(firstChar) ? firstChar : '#'; if (!groups[letter]) groups[letter] = []; groups[letter].push(contact) }); return Object.keys(groups).sort((a, b) => (a === '#' ? 1 : b === '#' ? -1 : a.localeCompare(b))).map(letter => ({ letter, contacts: groups[letter] })) });
+const createdGroups = computed(() => groupChats.value.filter(g => g.category === 'created')); const managedGroups = computed(() => groupChats.value.filter(g => g.category === 'managed')); const joinedGroups = computed(() => groupChats.value.filter(g => g.category === 'joined'));
+const contactActionItems = [{ name: '修改备注', value: 'remark' }, { name: '移动到分组', value: 'move' }, { name: '删除好友', value: 'delete', color: '#fa5151' }]; const groupActionItems = [{ name: '重命名', value: 'rename' }, { name: '删除分组', value: 'delete', color: '#fa5151' }]; const moveGroupActions = computed(() => { const actions: any[] = [{ name: '未分组', value: 0 }]; contactGroups.value.forEach(g => { if (selectedContact.value?.group_id !== g.id) actions.push({ name: g.group_name, value: g.id }) }); return actions });
+onMounted(() => loadData()); onShow(() => loadFriendRequests());
+async function loadData() { loading.value = true; try { const [contactList, groups, chats] = await Promise.all([contactApi.getContacts(), contactApi.getGroups(), roomApi.getUserGroups()]); chatStore.setContacts(contactList); contactGroups.value = groups; groupChats.value = chats || [] } catch (error) { console.error(error) } finally { loading.value = false } }
async function loadFriendRequests() { try { const requests = await contactApi.getFriendRequests(); contactStore.setFriendRequests(requests) } catch {} }
async function onRefresh() { refreshing.value = true; await loadData(); await loadFriendRequests(); refreshing.value = false }
-
function toggleCollapse(id: number | string) { const idx = collapsedIds.value.indexOf(id); idx === -1 ? collapsedIds.value.push(id) : collapsedIds.value.splice(idx, 1) }
function goSearch() { uni.navigateTo({ url: '/pages/search/index' }) }
function goAddFriend() { uni.navigateTo({ url: '/pages/contact/add' }) }
@@ -330,14 +259,12 @@ function goFriendRequests() { uni.navigateTo({ url: '/pages/contact/requests' })
function goGroupNotify() { uni.navigateTo({ url: '/pages/group/notify' }) }
function goContactDetail(contact: Contact) { uni.navigateTo({ url: `/pages/contact/detail?id=${contact.id}` }) }
function goGroupChat(group: GroupChat) { uni.navigateTo({ url: `/pages/chat/index?roomId=${group.room_id}&name=${encodeURIComponent(group.room_name || '群聊')}` }) }
-function scrollToLetter(letter: string) { /* Scroll logic */ console.log(letter) }
-
+function scrollToLetter(letter: string) { console.log(letter) }
function handleContactLongPress(c: Contact) { selectedContact.value = c; remarkName.value = c.remark_name || ''; showContactActions.value = true }
function onContactActionSelect(a: { value: string }) { showContactActions.value = false; if(a.value === 'remark') showRemarkModal.value = true; else if(a.value === 'move') showMoveGroupModal.value = true; else if(a.value === 'delete') handleDeleteContact() }
async function handleSaveRemark() { if(!selectedContact.value) return; savingRemark.value=true; try { await contactApi.updateContact(selectedContact.value.id.toString(), {remark_name: remarkName.value}); const idx = chatStore.contacts.findIndex(c => c.id === selectedContact.value?.id); if(idx>-1) chatStore.contacts[idx].remark_name = remarkName.value; showRemarkModal.value=false; toast.success('备注已修改') } catch(e){toast.error('失败')} finally {savingRemark.value=false} }
async function onMoveGroupSelect(a: { value: number }) { if(!selectedContact.value) return; showMoveGroupModal.value=false; try { await contactApi.updateContact(selectedContact.value.id.toString(), {group_id: a.value}); const idx = chatStore.contacts.findIndex(c => c.id === selectedContact.value?.id); if(idx>-1) chatStore.contacts[idx].group_id = a.value; toast.success('已移动') } catch { toast.error('失败') } }
async function handleDeleteContact() { try { await messageBox.confirm({title:'提示', msg:'确定删除?'}); await contactApi.deleteContact(selectedContact.value!.id.toString()); const idx = chatStore.contacts.findIndex(c=>c.id===selectedContact.value!.id); if(idx>-1) chatStore.contacts.splice(idx,1); toast.success('已删除') } catch {} }
-
function handleGroupLongPress(g: ContactGroup) { selectedGroup.value=g; renameGroupName.value=g.group_name; showGroupActions.value=true }
function onGroupActionSelect(a: { value: string }) { showGroupActions.value=false; if(a.value==='rename') showRenameGroupModal.value=true; else if(a.value==='delete') handleDeleteGroup() }
async function handleCreateGroup() { if(!newGroupName.value.trim()) return; creating.value=true; try { const ng = await contactApi.createGroup({group_name: newGroupName.value.trim()}); contactGroups.value.push(ng); showCreateGroupModal.value=false; newGroupName.value=''; toast.success('成功') } catch { toast.error('失败') } finally { creating.value=false } }
@@ -346,7 +273,6 @@ async function handleDeleteGroup() { try { await messageBox.confirm({title:'提
diff --git a/src/pages/contact/requests.vue b/src/pages/contact/requests.vue
index 1b76cc0..4ee3ba9 100644
--- a/src/pages/contact/requests.vue
+++ b/src/pages/contact/requests.vue
@@ -1,177 +1,146 @@
-
-
-
-
-
-
- 加载中...
-
+
+
+
-
-
-
-
-
-
-
- {{ item.from_user?.name || '未知用户' }}
- {{ item.message || '请求添加您为好友' }}
+
+
+
+ 加载中...
-
-
- 拒绝
- 同意
-
-
- {{ item.status === 'accepted' ? '已添加' : '已拒绝' }}
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ item.from_user?.name || '未知用户' }}
+ 刚刚
+
+
+ {{ item.message || '请求添加您为好友' }}
+
+
+
+
+
+
-
-
-
+
+
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 47c01f4..2ca176e 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,20 +1,190 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ user?.name || '消息' }}
+
+ 在线
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+ 连接中...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name || '未知' }}
+
+
+ {{ formatMessageTime(item.last_time) }}
+
+
+
+ {{ item.last_message || '暂无消息' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ user?.name || '请登录' }}
+ {{ user?.desc || '编辑个签,展示你的独特个性' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ user?.name || '消息' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
-
-
-
-
-
-
-
-
- 同步消息中...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name || '未知' }}
-
-
-
- {{ formatMessageTime(item.last_time) }}
-
-
-
-
-
- {{ item.last_message || '暂无消息' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ user?.name || '请登录' }}
-
-
- {{ user?.desc || '编辑个签,展示你的独特个性' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/moment/index.vue b/src/pages/moment/index.vue
index 009c72b..39dc88c 100644
--- a/src/pages/moment/index.vue
+++ b/src/pages/moment/index.vue
@@ -1,169 +1,162 @@
-
-
-
-
- 朋友圈
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/pages/profile/edit.vue b/src/pages/profile/edit.vue
index c9cc21d..b0aa1dd 100644
--- a/src/pages/profile/edit.vue
+++ b/src/pages/profile/edit.vue
@@ -1,109 +1,94 @@
-
-
-
-
-
-
- {{ value.length }}/{{ maxLength }}
+
+
+
+
+
+
+
+
+ {{ value.length }}/{{ maxLength }}
+
+
+
+ 保存
+
+
-
-
+
diff --git a/src/pages/profile/index.vue b/src/pages/profile/index.vue
index 4816f6b..5c339f7 100644
--- a/src/pages/profile/index.vue
+++ b/src/pages/profile/index.vue
@@ -1,138 +1,139 @@
-
-
-
+
+
-
-
-
-
-
-
-
- {{ userInfo.nickname || '未设置昵称' }}
-
+
+
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
diff --git a/src/pages/search/index.vue b/src/pages/search/index.vue
index a090ad6..5ce50b4 100644
--- a/src/pages/search/index.vue
+++ b/src/pages/search/index.vue
@@ -1,15 +1,16 @@
-
+
@@ -20,14 +21,14 @@
清空
-
{{ item }}
-
+
@@ -41,25 +42,26 @@
-
-
-
-
+
+
+ :size="88"
+ radius="12rpx"
+ />
+
+ {{ item.name }}
+ {{ item.desc || '暂无签名' }}
-
-
+
+
+
@@ -161,60 +163,67 @@ function goDetail(item: User) {
.search-page {
min-height: 100vh;
background: var(--bg-page);
+ display: flex;
+ flex-direction: column;
}
.search-header {
background: var(--bg-content);
+ padding: 10rpx 20rpx;
+ position: sticky;
+ top: 0;
+ z-index: 100;
}
.safe-area-top {
- padding-top: var(--status-bar-height, 0);
+ padding-top: var(--status-bar-height);
}
.history-section {
- background: var(--bg-content);
- margin-top: 20rpx;
padding: 30rpx;
-
.section-header {
- display: flex;
- justify-content: space-between;
- margin-bottom: 24rpx;
-
- .title {
- font-size: 28rpx;
- color: var(--text-tertiary);
- }
-
- .clear {
- font-size: 28rpx;
- color: var(--text-tertiary);
- }
+ display: flex; justify-content: space-between; margin-bottom: 24rpx;
+ .title { font-size: 28rpx; font-weight: 600; color: var(--text-primary); }
+ .clear { font-size: 26rpx; color: var(--text-tertiary); }
}
-
.history-tags {
- display: flex;
- flex-wrap: wrap;
- gap: 16rpx;
+ display: flex; flex-wrap: wrap; gap: 20rpx;
+ .history-tag {
+ background: var(--bg-content); padding: 10rpx 24rpx; border-radius: 30rpx;
+ font-size: 26rpx; color: var(--text-secondary);
+ &:active { opacity: 0.7; }
+ }
}
}
.results-section {
- background: var(--bg-content);
- margin-top: 20rpx;
+ flex: 1;
+ background: var(--bg-page);
}
.loading-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 60rpx;
- color: var(--text-tertiary);
- gap: 20rpx;
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
+ padding-top: 100rpx; color: var(--text-tertiary); gap: 20rpx;
}
-.result-avatar {
- margin-right: 24rpx;
+.result-list {
+ padding: 20rpx;
+}
+
+.result-item {
+ display: flex; align-items: center;
+ background: var(--bg-content);
+ padding: 24rpx;
+ border-radius: 20rpx;
+ margin-bottom: 20rpx;
+ transition: opacity 0.2s;
+
+ &:active { opacity: 0.8; }
+
+ .result-info {
+ flex: 1; margin-left: 24rpx; display: flex; flex-direction: column;
+ .name { font-size: 32rpx; font-weight: 600; color: var(--text-primary); }
+ .desc { font-size: 24rpx; color: var(--text-tertiary); margin-top: 6rpx; }
+ }
}
diff --git a/src/pages/settings/index.vue b/src/pages/settings/index.vue
index edbaae7..189622e 100644
--- a/src/pages/settings/index.vue
+++ b/src/pages/settings/index.vue
@@ -1,37 +1,47 @@
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+ 账号
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+ 通用
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
- 退出登录
+
+
+ 退出登录
+
-
-
-
-
+
+
+
+
diff --git a/src/pages/settings/theme.vue b/src/pages/settings/theme.vue
index c91d677..dd5fab5 100644
--- a/src/pages/settings/theme.vue
+++ b/src/pages/settings/theme.vue
@@ -1,56 +1,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
- 「跟随系统」会根据系统设置自动切换深色/浅色模式
+
+
+
+
+
+
+
+ 浅色模式
+
+
+
+
+
+
+
+
+ 深色模式
+
+
+
+
+
+
+ 跟随系统
+
+
+
+
+
+ 「跟随系统」开启后,将根据系统显示设置自动切换深色或浅色模式。
+
+
+
+
-
-
-
+
-
diff --git a/src/styles/variables.scss b/src/styles/variables.scss
index e05e1a5..c3d1e85 100644
--- a/src/styles/variables.scss
+++ b/src/styles/variables.scss
@@ -59,53 +59,49 @@ page {
// 开关
--switch-on: #07c160;
--switch-off: #e5e5e5;
+
+ // 状态栏高度变量 (小程序/App会自动注入,H5需fallback)
+ --status-bar-height: 20px;
}
-// 暗色主题 (支持多种选择器以兼容 H5)
+// 暗色主题 (Dark Mode - 高级灰优化)
page.dark,
.dark,
html.dark,
body.dark {
- // 背景色
- --bg-page: #111111;
- --bg-content: #1e1e1e;
- --bg-hover: #2a2a2a;
+ // 背景色 - 使用 #1c1c1e 替代纯黑
+ --bg-page: #1c1c1e;
+ --bg-content: #2c2c2e;
+ --bg-hover: #3a3a3c;
--bg-mask: rgba(0, 0, 0, 0.7);
- --bg-card: #1e1e1e;
+ --bg-card: #2c2c2e;
// 文字颜色
- --text-primary: #e5e5e5;
- --text-secondary: #a0a0a0;
- --text-tertiary: #666666;
- --text-placeholder: #444444;
+ --text-primary: #f2f2f7; // 柔和白
+ --text-secondary: #aeaeb2;
+ --text-tertiary: #636366;
+ --text-placeholder: #505055;
--text-link: #7b9ad0;
// 边框颜色
- --border-color: #333333;
- --divider-color: #2a2a2a;
+ --border-color: #38383a;
+ --divider-color: #38383a;
// 导航栏
- --nav-bg: #1a1a1a;
+ --nav-bg: #1c1c1e;
--nav-text: #ffffff;
// 标签栏
- --tabbar-bg: #1a1a1a;
+ --tabbar-bg: #1c1c1e;
// 消息气泡
- --bubble-self: #2d5c2e;
- --bubble-other: #2a2a2a;
+ --bubble-self: #2d5c2e; // 深绿
+ --bubble-other: #2c2c2e;
--bubble-system: rgba(255, 255, 255, 0.1);
// 搜索框
- --search-bg: #2a2a2a;
+ --search-bg: #2c2c2e;
// 开关
- --switch-off: #444444;
+ --switch-off: #3a3a3c;
}
-
-
-
-
-
-
-