feat: redesign discovery and messages tabs

This commit is contained in:
Codex
2026-09-14 06:49:49 +08:00
parent 36b15d9ca8
commit b7dc52b517
12 changed files with 214 additions and 368 deletions
+48 -38
View File
@@ -1,42 +1,52 @@
<!-- 消息列表页 U23 -->
<view class="page reference-page">
<ui-section-header
wx:if="{{conversations.length > 0}}"
title="消息"
subtitle="{{unreadTotal > 0 ? unreadTotal + ' 条未读' : '全部已读'}}"
/>
<!-- 消息列表页:仅服务端允许的 Mutual Match 会话可进入聊天 -->
<view class="page app-page reference-page">
<view class="messages-hero">
<view class="messages-nav">
<text class="messages-title">消息</text>
<image class="messages-search" src="/assets/icons/ui/search.png" mode="aspectFit" />
</view>
<view class="message-shortcuts">
<view class="message-shortcut" bindtap="onShortcutTap" data-key="new-friends">
<view class="shortcut-icon shortcut-icon--blue"><image src="/assets/icons/home/find-object.png" mode="aspectFit" /></view>
<text>新朋友</text>
</view>
<view class="message-shortcut" bindtap="onShortcutTap" data-key="likes">
<view class="shortcut-icon shortcut-icon--pink"><image src="/assets/brand/logo-mark.png" mode="aspectFit" /></view>
<text>互动喜欢</text>
</view>
<view class="message-shortcut" bindtap="onShortcutTap" data-key="following">
<view class="shortcut-icon shortcut-icon--purple"><image src="/assets/icons/home/matchmaker.png" mode="aspectFit" /></view>
<text>我的关注</text>
</view>
<view class="message-shortcut" bindtap="onShortcutTap" data-key="system">
<view class="shortcut-icon shortcut-icon--coral"><image src="/assets/icons/ui/warning.png" mode="aspectFit" /></view>
<text>系统通知</text>
</view>
</view>
</view>
<!-- 加载中(首次) -->
<ui-loading
wx:if="{{loading && conversations.length === 0}}"
mode="skeleton"
rows="4"
/>
<view class="messages-content">
<ui-section-header title="最近联系" subtitle="{{unreadTotal > 0 ? unreadTotal + ' 条未读' : '全部已读'}}" />
<!-- 会话列表 -->
<block wx:elif="{{conversations.length > 0}}">
<ui-conversation-item
wx:for="{{conversations}}"
wx:key="conversationId"
conversation="{{item}}"
bind:tap="onGoChat"
<ui-loading wx:if="{{loading && conversations.length === 0}}" mode="skeleton" rows="4" />
<view wx:elif="{{conversations.length > 0}}" class="conversation-list">
<ui-conversation-item
wx:for="{{conversations}}"
wx:key="conversationId"
conversation="{{item}}"
bind:tap="onGoChat"
/>
<ui-loading wx:if="{{loading}}" mode="spinner" text="加载更多会话" inline />
</view>
<ui-empty
wx:elif="{{!loading}}"
illustration="message"
title="还没有消息"
description="互相喜欢后可以开始聊天。去看看今天为你推荐的人吧。"
actions="{{emptyActions}}"
bind:action="onEmptyAction"
/>
<!-- 加载更多 -->
<ui-loading
wx:if="{{loading && conversations.length > 0}}"
mode="spinner"
text="加载更多会话…"
inline
/>
</block>
<!-- 空状态 -->
<ui-empty
wx:elif="{{!loading}}"
illustration="message"
title="还没有消息"
description="互相喜欢后可以开始聊天。去看看今天为你推荐的人吧。"
actions="{{emptyActions}}"
bind:action="onEmptyAction"
/>
</view>
</view>