- 新增 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;已做负向注入验证判别力
119 lines
8.9 KiB
Plaintext
119 lines
8.9 KiB
Plaintext
<view class="page app-page reference-page" style="{{navVars}}">
|
||
<view class="night-shell">
|
||
<view class="brand-bar">
|
||
<view class="brand-lockup">
|
||
<image class="brand-logo" src="/assets/brand/logo-mark.png" mode="aspectFit" />
|
||
<view class="brand-copy">
|
||
<text class="brand-name">善缘丹阳</text>
|
||
<text class="brand-slogan">公益婚恋服务平台</text>
|
||
</view>
|
||
</view>
|
||
<view class="brand-actions" bindtap="onMessages">
|
||
<text class="message-label">消息</text>
|
||
<text wx:if="{{unreadCount}}" class="badge">{{unreadCount}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="status-strip">
|
||
<view wx:if="{{isOnboarding}}" class="status-main">
|
||
<view class="status-copy">
|
||
<text class="status-title">完善资料,开启安心相遇</text>
|
||
<text class="status-desc">{{onboardingMessage}}</text>
|
||
</view>
|
||
<view class="status-action" bindtap="onEmptyAction" data-event="{{onboardingActions[0].event}}">{{onboardingActions[0].text}}</view>
|
||
</view>
|
||
<view wx:elif="{{isPaused}}" class="status-main">
|
||
<view class="status-copy"><text class="status-title">已暂停新的对象推荐</text><text class="status-desc">你的资料仍被安全保存</text></view>
|
||
<view class="status-action" bindtap="onResume">恢复寻找</view>
|
||
</view>
|
||
<view wx:elif="{{isSuccessful}}" class="status-main">
|
||
<view class="status-copy"><text class="status-title">祝福你们认真了解彼此</text><text class="status-desc">愿真诚与尊重陪伴你们继续前行</text></view>
|
||
</view>
|
||
<view wx:else class="status-checks">
|
||
<text wx:for="{{statusChecks}}" wx:key="label" class="status-check {{item.done ? 'done' : ''}}">{{item.done ? '已完成' : '待完成'}} · {{item.label}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="banner-section">
|
||
<swiper wx:if="{{banners.length}}" class="banner-swiper" indicator-dots autoplay circular interval="4500" indicator-active-color="#FF4F91" bindchange="onBannerChange">
|
||
<swiper-item wx:for="{{banners}}" wx:key="id">
|
||
<view class="banner-card" bindtap="onBannerTap" data-item="{{item}}">
|
||
<image class="banner-img" src="{{item.imageFileId || '/assets/brand/home-hero-v2.jpg'}}" mode="aspectFill" />
|
||
<view class="banner-overlay"></view>
|
||
<view class="banner-copy"><text class="banner-kicker">公益 · 本地 · 真实 · 安全</text><text class="banner-title">{{item.title}}</text><text class="banner-subtitle">{{item.subtitle}}</text></view>
|
||
</view>
|
||
</swiper-item>
|
||
</swiper>
|
||
<view wx:else class="banner-card banner-fallback">
|
||
<image class="banner-img" src="/assets/brand/home-hero-v2.jpg" mode="aspectFill" />
|
||
<view class="banner-overlay"></view>
|
||
<view class="banner-copy"><text class="banner-kicker">公益 · 本地 · 真实 · 安全</text><text class="banner-title">在丹阳,遇见更好的你</text><text class="banner-subtitle">认真认识,温暖相伴</text></view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="entries-card">
|
||
<view class="entries-grid">
|
||
<view wx:for="{{quickEntries}}" wx:key="code" class="entry-item {{!item.enabled ? 'disabled' : ''}}" bindtap="onEntryTap" data-entry="{{item}}">
|
||
<view class="entry-icon tone-{{item.tone}}"><image class="entry-icon-image" src="{{item.iconAsset}}" mode="aspectFit" /></view>
|
||
<text class="entry-label">{{item.label}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{previewMode}}" class="preview-note">当前为界面预览数据</view>
|
||
<view wx:if="{{loadError}}" class="section"><ui-error-state title="暂时无法加载首页" description="请检查网络后重试" bind:retry="onRetry" /></view>
|
||
<block wx:else>
|
||
<view class="section recommendation-section">
|
||
<ui-section-header title="今日推荐" subtitle="根据双方条件,为你认真筛选" action="查看更多" bind:action="onSeeMore" />
|
||
<ui-loading wx:if="{{loading}}" mode="skeleton" rows="2" />
|
||
<view wx:elif="{{recommendations.length}}" class="recommend-list">
|
||
<ui-recommend-card wx:for="{{recommendations}}" wx:key="userId" recommendation="{{item}}" action-loading="{{actionLoadingUserId === item.userId}}" bind:view="onViewDetail" bind:like="onLike" bind:pass="onPass" />
|
||
</view>
|
||
<view wx:else class="recommend-empty">
|
||
<image class="empty-logo" src="/assets/brand/logo-mark.png" mode="aspectFit" />
|
||
<view class="empty-copy"><text class="empty-title">暂时没有完全符合双方条件的人</text><text class="empty-desc">我们坚持必须符合的条件,不会为了数量降低筛选标准</text></view>
|
||
<view class="empty-actions"><view class="empty-btn secondary" bindtap="onEmptyAction" data-event="preference">调整条件</view><view class="empty-btn primary" bindtap="onEmptyAction" data-event="matchmaker">公益红娘</view></view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 善缘公益服务:卡片宽度与高度都缩到原尺寸的 1/3(约 224rpx × 168rpx),
|
||
只留配图 + 标题 + 一个短入口,长文案交给详情页 -->
|
||
<view class="section">
|
||
<ui-section-header title="善缘公益服务" subtitle="需要时,我们在这里陪伴你" />
|
||
<view wx:if="{{serviceRecommendations.length}}" class="mini-rail">
|
||
<view wx:for="{{serviceRecommendations}}" wx:key="type" class="mini-card" bindtap="onServiceTap" data-type="{{item.type}}">
|
||
<image class="mini-card-cover" src="/assets/covers/counseling-default.jpg" mode="aspectFill" />
|
||
<view class="mini-card-scrim"></view>
|
||
<text class="mini-card-title">{{item.title}}</text>
|
||
<text class="mini-card-sub">{{item.ctaText}}</text>
|
||
</view>
|
||
</view>
|
||
<view wx:else class="section-empty">暂无待推荐的公益服务</view>
|
||
</view>
|
||
|
||
<view class="section"><ui-section-header title="近期公益活动" action="全部活动" bind:action="onSeeAllActivities" /><scroll-view wx:if="{{activities.length}}" scroll-x class="activity-scroll"><view wx:for="{{activities}}" wx:key="id" class="activity-card" bindtap="onActivityTap" data-id="{{item.id}}"><image class="activity-cover" src="{{item.coverFileId || '/assets/covers/activity-default.jpg'}}" mode="aspectFill" /><view class="activity-info"><text class="activity-tag">公益活动</text><text class="activity-title">{{item.title}}</text><text class="activity-meta">{{item.locationName}}</text></view></view></scroll-view><view wx:else class="section-empty">近期暂无可报名活动</view></view>
|
||
|
||
<view class="section"><ui-section-header title="善缘服务站" subtitle="就在身边的公益婚恋服务阵地" /><view wx:if="{{serviceLocation}}" class="station-card" bindtap="onStationTap"><image class="station-cover" src="/assets/covers/station-default.jpg" mode="aspectFill" /><view class="station-info"><text class="station-name">{{serviceLocation.name}}</text><text class="station-desc">{{serviceLocation.shortName || serviceLocation.address}}</text><view><text wx:for="{{serviceLocation.services}}" wx:key="*this" class="mini-tag">{{item}}</text></view></view><image class="arrow-icon" src="/assets/icons/ui/chevron-right.png" mode="aspectFit" /></view><view wx:else class="section-empty" bindtap="onStationTap">查看线下公益服务阵地</view></view>
|
||
|
||
<view class="section"><ui-section-header title="婚恋课堂" subtitle="学习成长,收获更好的自己" action="更多内容" bind:action="onEntryTap" data-entry="{{quickEntries[4]}}" /><view wx:if="{{articles.length}}" class="article-list"><view wx:for="{{articles}}" wx:key="id" class="article-row" bindtap="onArticleTap" data-id="{{item.id}}"><image class="article-cover" src="{{item.coverFileId || '/assets/covers/classroom-default.jpg'}}" mode="aspectFill" /><view class="article-info"><text class="article-title">{{item.title}}</text><text class="article-meta">善缘课堂 · 公益内容</text></view><image class="arrow-icon" src="/assets/icons/ui/chevron-right.png" mode="aspectFit" /></view></view><view wx:else class="section-empty">暂无新内容,稍后再来看看</view></view>
|
||
|
||
<!-- 善缘安全提醒:同样缩到 1/3 宽度的小卡,右侧用文字承载安全提示原文与入口
|
||
(安全提示文案是公益属性的一部分,不能整块丢掉) -->
|
||
<view class="section">
|
||
<view class="mini-rail">
|
||
<view class="mini-card" bindtap="onSafetyTap">
|
||
<image class="mini-card-cover" src="/assets/covers/anti-fraud-default.jpg" mode="aspectFill" />
|
||
<view class="mini-card-scrim"></view>
|
||
<text class="mini-card-title">善缘安全提醒</text>
|
||
</view>
|
||
<view class="mini-note">
|
||
<text class="mini-note-text">{{safetyNotice.text}}</text>
|
||
<text class="mini-note-link" bindtap="onSafetyTap">{{safetyNotice.ctaText}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</block>
|
||
<view class="safe-area-bottom"></view>
|
||
</view>
|