Files
2026-10-07 14:55:06 +08:00

151 lines
6.4 KiB
Plaintext

<view class="page-bg">
<view class="container">
<view wx:if="{{ loading }}" class="state">
<text class="state-text">加载中…</text>
</view>
<view wx:elif="{{ !attendant }}" class="state">
<text class="state-text">该陪诊师信息不存在或已下架</text>
</view>
<block wx:else>
<!-- 主卡:头像居中,姓名 + 资质徽标,再接一行从业信息。
与列表页卡片同语言(白卡 + 发丝边 + 紧阴影),但居中排布,
让"一个人"与列表里的"一条记录"在版式上区分开 -->
<view class="profile-card">
<!-- 头像兜底:无头像时用浅橙衬底 + 姓氏首字,避免破图 -->
<image
wx:if="{{ attendant.avatar }}"
class="profile-avatar"
src="{{ attendant.avatar }}"
mode="aspectFill"
/>
<view wx:else class="profile-avatar profile-avatar-fallback">
<text class="profile-avatar-text">{{ attendant.initial }}</text>
</view>
<view class="profile-name-row">
<text class="profile-name">{{ attendant.name }}</text>
<view class="profile-badge" wx:if="{{ attendant.qualificationVerified }}">
<t-icon name="check" size="22rpx" color="#9B4508" />
<text class="profile-badge-text">资质已核验</text>
</view>
</view>
<view class="profile-meta">
<text class="profile-meta-text">从业 {{ attendant.workYears }} 年</text>
<view class="meta-sep"></view>
<text class="profile-meta-text">已服务 {{ attendant.orderCount }} 次</text>
</view>
</view>
<!-- 擅长场景:全量展示,不截断 -->
<view class="section" wx:if="{{ specialtyTags.length > 0 }}">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">擅长场景</text>
</view>
<view class="tag-card">
<text
class="tag"
wx:for="{{ specialtyTags }}"
wx:for-item="tag"
wx:key="*this"
>{{ tag }}</text>
</view>
</view>
<!-- 服务信息:有哪项展示哪项,整行不留空标签 -->
<view class="section" wx:if="{{ attendant.sexText || attendant.age > 0 || areaText || langText }}">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">服务信息</text>
</view>
<view class="info-card">
<view class="info-row" wx:if="{{ attendant.sexText }}">
<text class="info-label">性别</text>
<text class="info-value">{{ attendant.sexText }}</text>
</view>
<view class="info-row" wx:if="{{ attendant.age > 0 }}">
<text class="info-label">年龄</text>
<text class="info-value">{{ attendant.age }} 岁</text>
</view>
<view class="info-row" wx:if="{{ areaText }}">
<text class="info-label">服务区域</text>
<text class="info-value">{{ areaText }}</text>
</view>
<view class="info-row" wx:if="{{ langText }}">
<text class="info-label">服务语言</text>
<text class="info-value">{{ langText }}</text>
</view>
</view>
</view>
<!-- 资质与培训:健康证明是国标 4.2.1.5 的公示项。
运营没登就整块隐藏,不用"待补充"占位 -->
<view class="section" wx:if="{{ attendant.healthCertificateText || trainings.length > 0 }}">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">资质与培训</text>
</view>
<view class="info-card">
<view class="info-row" wx:if="{{ attendant.healthCertificateText }}">
<text class="info-label">健康证明</text>
<text class="info-value">{{ attendant.healthCertificateText }}</text>
</view>
<!-- 培训记录:一条一条列,便于逐条核对 -->
<view class="training-item" wx:for="{{ trainings }}" wx:key="title">
<view class="training-head">
<text class="training-title">{{ item.title }}</text>
<text class="training-date" wx:if="{{ item.date }}">{{ item.date }}</text>
</view>
<text class="training-org" wx:if="{{ item.org }}">{{ item.org }}</text>
</view>
</view>
</view>
<!-- 过往服务评价:只展示聚合结果,不放评价原文——
原文展示要先定好评人的脱敏口径与内容审核,属评价体系下一轮 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">过往服务评价</text>
</view>
<view class="info-card">
<view class="review-box" wx:if="{{ attendant.reviewScore !== null }}">
<text class="review-score">{{ attendant.reviewScore }}</text>
<text class="review-unit">/ 5</text>
<text class="review-count">共 {{ attendant.reviewCount }} 条评价</text>
</view>
<!-- 条数未达后端阈值不给分数,避免"1 条 5 分"被读成满分口碑 -->
<text wx:else class="review-empty">
{{ attendant.reviewCount > 0 ? '评价条数不足,暂不显示评分' : '暂无评价' }}
</text>
</view>
</view>
<!-- 个人简介:运营未填就整块隐藏,不留空标题 -->
<view class="section" wx:if="{{ attendant.introduction }}">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">个人简介</text>
</view>
<view class="info-card">
<text class="intro-text">{{ attendant.introduction }}</text>
</view>
</view>
<!-- 说明:与列表页同一口径,只交代字段边界,
同时暗示「不展示联系方式」是有意为之,而非信息缺失。
不补充「如何指定陪诊师」之类的话术——那是尚未开放的能力 -->
<view class="notice">
<text class="notice-text">以上为陪同人员信息公示,用于核对身份与从业信息,不含联系方式。</text>
</view>
</block>
<view class="footer-space"></view>
</view>
</view>