Files
danyang-match/miniapp/pages/fate-center/fate-center.wxml
T
WorkBuddy c0298c27a5 fix(miniapp): 小程序界面全量中文化,消除英文/非中文枚举码上屏
- 新增 miniapp/constants/profileLabels.js 作为「枚举码→中文简体」唯一字典
  (婚姻/子女/学历/职业/吸烟饮酒/择偶子女/红娘状态),覆盖表单值与种子
  实际值两套并集,保证详情页无论后端返回哪种码都显示中文
- 修复「择偶条件-子女」下拉英文选项(any/accept/reject→不限/可接受/不接受),
  改用 value/label 数组 + range-key="label"
- 修复 recommend-card / user-card / profile-detail / profile-confirm 直接渲染
  后端枚举码(educationCode/maritalStatus/occupationCode…)的问题,改由
  observers 派生中文 label 上屏
- 清理残留英文文案:Required 条件→必须符合的条件、喜欢TA/向Ta→喜欢对方/向对方、
  U51 服务预约→服务预约、U64 公益服务记录→公益服务记录
- 修复 7 个英文窗口标题与 3 个英文占位页正文
- matchmaker 历史服务状态消除原始码兜底,统一走字典
- 加固 scripts/audit-miniapp-language.mjs(A 整行先剥离 mustache、B 排除
  bind:action 处理器、F 窗口标题、JPG/PNG 入白名单)
- 新增 ui-tests/miniapp-language-contracts.mjs 语种守卫(复用审计脚本,断言 0 命中),
  UI 契约门禁 MIN_GUARDS 21→22;已做负向注入验证判别力
2026-09-23 11:19:17 +08:00

106 lines
4.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 我的缘分页 U22(重构:ui-nav-bar + ui-user-card + matchStore) -->
<view class="page">
<ui-nav-bar
title="我的缘分"
show-back="{{true}}"
status-bar-height="{{statusBarHeight}}"
nav-bar-height="{{navBarHeight}}"
bind:back="onBack"
/>
<!-- Tab 切换 -->
<view class="tabs" style="top: {{statusBarHeight + navBarHeight}}px;">
<view class="tab {{activeTab === 'mutual' ? 'active' : ''}}" data-tab="mutual" bindtap="onTabChange">
互相喜欢
<text class="tab-count" wx:if="{{mutualList.length > 0}}">{{mutualList.length}}</text>
</view>
<view class="tab {{activeTab === 'liked' ? 'active' : ''}}" data-tab="liked" bindtap="onTabChange">
我喜欢的
<text class="tab-count" wx:if="{{likedList.length > 0}}">{{likedList.length}}</text>
</view>
<view class="tab {{activeTab === 'likers' ? 'active' : ''}}" data-tab="likers" bindtap="onTabChange">
喜欢我的
<text class="tab-count" wx:if="{{likersCount > 0}}">{{likersCount}}</text>
</view>
</view>
<view class="list-wrap">
<!-- 首次加载 -->
<ui-loading wx:if="{{loading}}" mode="skeleton" rows="4" />
<block wx:elif="{{activeTab === 'mutual'}}">
<block wx:if="{{mutualList.length > 0}}">
<view class="list">
<view class="item" wx:for="{{mutualList}}" wx:key="conversationId">
<ui-user-card user="{{item}}" bind:tap="onViewDetail">
<view slot="actions">
<button class="btn-primary" catchtap="onStartChat" data-conversation-id="{{item.conversationId}}">开始聊天</button>
</view>
</ui-user-card>
</view>
</view>
<ui-loading wx:if="{{loadingMore}}" mode="skeleton" rows="2" />
</block>
<ui-empty
wx:else
illustration="heart"
title="还没有互相喜欢的人"
description="去「找对象」遇见合适的人,互相喜欢就能聊天啦"
actions="{{[{text:'去「找对象', event:'discover', variant:'primary'}]}}"
bind:action="onEmptyAction"
/>
</block>
<block wx:elif="{{activeTab === 'liked'}}">
<block wx:if="{{likedList.length > 0}}">
<view class="list">
<view class="item" wx:for="{{likedList}}" wx:key="userId">
<ui-user-card user="{{item}}">
<view slot="actions">
<view class="status-waiting">已表达喜欢,等待回应</view>
</view>
</ui-user-card>
</view>
</view>
<ui-loading wx:if="{{loadingMore}}" mode="skeleton" rows="2" />
</block>
<ui-empty
wx:else
illustration="heart"
title="还没有喜欢过任何人"
description="去「找对象」看看,遇到心仪的人就表达喜欢吧"
actions="{{[{text:'去「找对象', event:'discover', variant:'primary'}]}}"
bind:action="onEmptyAction"
/>
</block>
<block wx:elif="{{activeTab === 'likers'}}">
<block wx:if="{{likersList.length > 0}}">
<view class="list">
<view class="item" wx:for="{{likersList}}" wx:key="userId">
<ui-user-card user="{{item}}">
<view slot="actions">
<button
class="btn-like-back {{actionLoadingUserId === item.userId ? 'disabled' : ''}}"
catchtap="onLikeBack"
data-user-id="{{item.userId}}"
disabled="{{actionLoadingUserId === item.userId}}"
>喜欢对方</button>
</view>
</ui-user-card>
</view>
</view>
<ui-loading wx:if="{{loadingMore}}" mode="skeleton" rows="2" />
</block>
<ui-empty
wx:else
illustration="heart"
title="还没有人喜欢你"
description="完善资料、上传真实生活照,更容易被合适的人看到"
actions="{{[{text:'去「找对象', event:'discover', variant:'primary'}]}}"
bind:action="onEmptyAction"
/>
</block>
</view>
</view>