优化了页面;增加了陪诊师页面
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
const API = require('../../utils/api.js')
|
||||
|
||||
// 陪诊师详情:数据来自后端公开接口 /health/attendant/:id
|
||||
// 与列表页是同一份白名单数据(不含手机号 / 身份证号 / 证书编号原文),
|
||||
// 差别在于详情页按 GB/T 47801—2026 4.2.1.5 把公示项补全:
|
||||
// 不截断擅长场景,并额外展示个人简介、健康证明有效期、培训记录与过往服务评价
|
||||
// (培训记录是数组、评价要多一次聚合查询,所以只在详情里带)
|
||||
Page({
|
||||
data: {
|
||||
loading: true,
|
||||
// null 表示查不到(ID 非法、已离职或已下架),模板据此渲染空态
|
||||
attendant: null,
|
||||
specialtyTags: [],
|
||||
trainings: [],
|
||||
areaText: '',
|
||||
langText: ''
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const id = options.id
|
||||
if (!id) {
|
||||
this.setData({ loading: false })
|
||||
return
|
||||
}
|
||||
this.loadAttendant(id)
|
||||
},
|
||||
|
||||
loadAttendant(id) {
|
||||
API.escort.getAttendantById(id)
|
||||
.then((res) => {
|
||||
const item = res.code === 0 && res.data && res.data.attendant
|
||||
if (!item) {
|
||||
this.setData({ loading: false })
|
||||
return
|
||||
}
|
||||
|
||||
const name = item.name || ''
|
||||
const healthCertificate = item.healthCertificate || {}
|
||||
const review = item.review || {}
|
||||
|
||||
// 健康证明按国标只公示「有效期」,文案分有效 / 已过期两种;
|
||||
// 运营没登到期日就整行不显示(不给"有效"的默认结论)
|
||||
let healthCertificateText = ''
|
||||
if (healthCertificate.expireDate) {
|
||||
healthCertificateText = healthCertificate.valid
|
||||
? `有效期内(至 ${healthCertificate.expireDate})`
|
||||
: `已过期(${healthCertificate.expireDate})`
|
||||
}
|
||||
|
||||
const attendant = {
|
||||
id: item.id,
|
||||
name,
|
||||
avatar: item.avatar || '',
|
||||
// 头像兜底用的首字:姓名已脱敏为「姓 + 陪诊师」,取第一个字即可
|
||||
initial: name.slice(0, 1),
|
||||
// 后端 sex 为空串表示未登记,模板据此隐藏该行
|
||||
sexText: item.sex === 'male' ? '男' : item.sex === 'female' ? '女' : '',
|
||||
workYears: item.workYears || 0,
|
||||
orderCount: item.orderCount || 0,
|
||||
qualificationVerified: !!item.qualificationVerified,
|
||||
healthCertificateText,
|
||||
introduction: item.introduction || '',
|
||||
reviewCount: review.count || 0,
|
||||
// 评价条数未达后端阈值时 score 为 null,模板据此显示"暂不显示评分"
|
||||
reviewScore: typeof review.score === 'number' ? review.score : null
|
||||
}
|
||||
|
||||
this.setData({
|
||||
loading: false,
|
||||
attendant,
|
||||
// 详情页展示全部擅长场景,不再像列表页截断到 3 个
|
||||
specialtyTags: item.specialties || [],
|
||||
trainings: item.trainings || [],
|
||||
// 数组在 WXML 里不能直接拼展示,这里先转成文本
|
||||
areaText: (item.serviceAreas || []).join(' / '),
|
||||
langText: (item.languages || []).join(' / ')
|
||||
})
|
||||
|
||||
// 标题用脱敏名,比「陪诊师详情」更有信息量
|
||||
if (name) {
|
||||
wx.setNavigationBarTitle({ title: name })
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取陪诊师详情失败', err)
|
||||
this.setData({ loading: false })
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
const {
|
||||
attendant
|
||||
} = this.data
|
||||
|
||||
if (!attendant) {
|
||||
return {
|
||||
title: '暖橙陪诊 · 陪诊师团队',
|
||||
path: '/pages/attendant/attendantlist'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: `暖橙陪诊 · ${attendant.name}`,
|
||||
path: `/pages/attendant/attendantdetail?id=${attendant.id}`
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "陪诊师详情",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
<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 || 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="{{ 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>
|
||||
@@ -0,0 +1,299 @@
|
||||
/* pages/attendant/attendantdetail.wxss
|
||||
陪诊师详情:与陪诊师团队列表、陪诊指南同用一套暖橙 + 暖白令牌,
|
||||
令牌唯一来源在 app.wxss,本页不复制副本 */
|
||||
page {
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
.page-bg {
|
||||
min-height: 100vh;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 32rpx 32rpx 0;
|
||||
}
|
||||
|
||||
/* ===== 加载 / 空状态 ===== */
|
||||
.state {
|
||||
padding: 120rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* ===== 主卡:白卡 + 发丝边 + 紧阴影,居中排布 ===== */
|
||||
.profile-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 48rpx 32rpx 40rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.profile-avatar {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 36rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 无头像兜底:浅橙衬底 + 姓氏首字。
|
||||
box-sizing 必须显式声明,否则 2rpx 描边会把 144rpx 撑成 148rpx */
|
||||
.profile-avatar-fallback {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
}
|
||||
|
||||
.profile-avatar-text {
|
||||
font-size: 52rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.profile-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.profile-name {
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* 资质徽标:浅橙衬底 + 暖橙图标,不引入新的色相 */
|
||||
.profile-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
margin-left: 14rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
}
|
||||
|
||||
.profile-badge-text {
|
||||
margin-left: 4rpx;
|
||||
/* 中文最小 24rpx(12px),低于此不达可读下限 */
|
||||
font-size: 24rpx;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.profile-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.profile-meta-text {
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* 竖分隔线:与列表页、场景行同一档 --sep */
|
||||
.meta-sep {
|
||||
width: 2rpx;
|
||||
height: 22rpx;
|
||||
flex-shrink: 0;
|
||||
margin: 0 16rpx;
|
||||
background: var(--sep);
|
||||
}
|
||||
|
||||
/* ===== 分区:单竖条 + 区块标题(与全站 section-bar 同构) ===== */
|
||||
.section {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.section-bar {
|
||||
width: 8rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 4rpx;
|
||||
background: var(--brand-strong);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin-left: 14rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 擅长场景 ===== */
|
||||
.tag-card {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 每个 .tag 自带 12rpx 右 / 下外边距,右侧内边距相应减到 16rpx,
|
||||
否则最后一列标签会比左边多出 12rpx,看起来不居中 */
|
||||
padding: 28rpx 16rpx 16rpx 28rpx;
|
||||
border-radius: 24rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.tag {
|
||||
margin: 0 12rpx 12rpx 0;
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 8rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
font-size: 26rpx;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
/* ===== 服务信息:标签左 --muted、值 --ink,末行去分隔线 ===== */
|
||||
.info-card {
|
||||
padding: 4rpx 28rpx;
|
||||
border-radius: 24rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.info-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
width: 140rpx;
|
||||
flex-shrink: 0;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.info-value {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ===== 资质与培训:健康证明行 + 培训记录条目 =====
|
||||
健康证明复用 .info-row;培训条目用上边线彼此分隔。
|
||||
两条例外避免出现双线或顶线:
|
||||
- 紧跟在健康证明行后面时,行尾那条线已由 .info-row 提供
|
||||
- 作为卡片首个子元素时,不能贴着卡片上沿画线 */
|
||||
.training-item {
|
||||
padding: 24rpx 0;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.info-row + .training-item,
|
||||
.training-item:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.training-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.training-title {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.training-date {
|
||||
flex-shrink: 0;
|
||||
margin-left: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.training-org {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* ===== 过往服务评价 ===== */
|
||||
.review-box {
|
||||
display: flex;
|
||||
/* baseline 让「4.8」与「/ 5」在文字基线上对齐,而不是盒中线 */
|
||||
align-items: baseline;
|
||||
padding: 28rpx 0;
|
||||
}
|
||||
|
||||
.review-score {
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.review-unit {
|
||||
margin-left: 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* 条数推到右侧,与左边的分数形成两栏 */
|
||||
.review-count {
|
||||
margin-left: auto;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.review-empty {
|
||||
display: block;
|
||||
padding: 28rpx 0;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* 简介与 info-row 共用 info-card,但不带标签列 */
|
||||
.intro-text {
|
||||
display: block;
|
||||
padding: 28rpx 0;
|
||||
font-size: 26rpx;
|
||||
line-height: 1.8;
|
||||
color: var(--ink-2);
|
||||
}
|
||||
|
||||
/* ===== 底部说明 ===== */
|
||||
.notice {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.notice-text {
|
||||
font-size: 24rpx;
|
||||
line-height: 1.6;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.footer-space {
|
||||
height: 48rpx;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
const API = require('../../utils/api.js')
|
||||
|
||||
// 陪诊师公示列表:数据来自后端公开接口 /health/attendant
|
||||
// 该接口已做脱敏(不含手机号 / 身份证号 / 证书编号原文),
|
||||
// 前端不再做二次裁剪,只把后端字段整形为展示所需结构
|
||||
Page({
|
||||
data: {
|
||||
loading: true,
|
||||
attendants: []
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.loadAttendants()
|
||||
},
|
||||
|
||||
loadAttendants() {
|
||||
API.escort.getAttendants()
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
this.setData({ loading: false })
|
||||
return
|
||||
}
|
||||
|
||||
const list = (res.data && res.data.attendants) || []
|
||||
this.setData({
|
||||
loading: false,
|
||||
attendants: list.map((item) => {
|
||||
const specialties = item.specialties || []
|
||||
const serviceAreas = item.serviceAreas || []
|
||||
const languages = item.languages || []
|
||||
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
avatar: item.avatar,
|
||||
// 头像兜底用的首字:姓名已脱敏为「姓 + 陪诊师」,取第一个字即可
|
||||
initial: (item.name || '').slice(0, 1),
|
||||
workYears: item.workYears || 0,
|
||||
orderCount: item.orderCount || 0,
|
||||
qualificationVerified: !!item.qualificationVerified,
|
||||
// 擅长场景最多展示 3 个,避免长尾把卡片撑高;完整列表在详情页
|
||||
specialtyTags: specialties.slice(0, 3),
|
||||
// 数组在 WXML 里不能直接拼展示,这里先转成文本
|
||||
areaText: serviceAreas.join(' / '),
|
||||
langText: languages.join(' / ')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取陪诊师列表失败', err)
|
||||
this.setData({ loading: false })
|
||||
})
|
||||
},
|
||||
|
||||
// 整卡可点进详情。卡片右侧补 chevron 做点击暗示——
|
||||
// 项目约束不允许"无暗示的整卡可点"
|
||||
goToDetail(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
if (!id) {
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: `/pages/attendant/attendantdetail?id=${id}`
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '暖橙陪诊 · 陪诊师团队',
|
||||
path: '/pages/attendant/attendantlist'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "陪诊师团队",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<view class="page-bg">
|
||||
<view class="container">
|
||||
|
||||
<!-- 头部:小色带 + 深墨标题 + 一句定位(内页规范,与陪诊指南、联系我们同构) -->
|
||||
<view class="page-header">
|
||||
<view class="header-accent"></view>
|
||||
<text class="header-title">陪诊师团队</text>
|
||||
<text class="header-subtitle">每位都实名上岗,从业信息可核对</text>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{ loading }}" class="state">
|
||||
<text class="state-text">加载中…</text>
|
||||
</view>
|
||||
|
||||
<view wx:elif="{{ attendants.length === 0 }}" class="state">
|
||||
<text class="state-text">暂无陪诊师信息</text>
|
||||
</view>
|
||||
|
||||
<view wx:else class="list">
|
||||
<view
|
||||
class="staff-card"
|
||||
wx:for="{{ attendants }}"
|
||||
wx:key="id"
|
||||
data-id="{{ item.id }}"
|
||||
bindtap="goToDetail"
|
||||
>
|
||||
|
||||
<view class="staff-head">
|
||||
<!-- 头像兜底:无头像时用浅橙衬底 + 姓氏首字,避免破图。
|
||||
整页沿用「浅橙衬底承载标识」的语言,不额外引入色相 -->
|
||||
<image
|
||||
wx:if="{{ item.avatar }}"
|
||||
class="staff-avatar"
|
||||
src="{{ item.avatar }}"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view wx:else class="staff-avatar staff-avatar-fallback">
|
||||
<text class="staff-avatar-text">{{ item.initial }}</text>
|
||||
</view>
|
||||
|
||||
<view class="staff-main">
|
||||
<view class="staff-name-row">
|
||||
<text class="staff-name">{{ item.name }}</text>
|
||||
<view class="staff-badge" wx:if="{{ item.qualificationVerified }}">
|
||||
<t-icon name="check" size="22rpx" color="#9B4508" />
|
||||
<text class="staff-badge-text">资质已核验</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="staff-meta">
|
||||
<text class="staff-meta-text">从业 {{ item.workYears }} 年</text>
|
||||
<view class="meta-sep"></view>
|
||||
<text class="staff-meta-text">已服务 {{ item.orderCount }} 次</text>
|
||||
</view>
|
||||
<!-- 擅长场景:与姓名、从业信息同列,排在从业信息下方 -->
|
||||
<view class="staff-tags" wx:if="{{ item.specialtyTags.length > 0 }}">
|
||||
<text
|
||||
class="staff-tag"
|
||||
wx:for="{{ item.specialtyTags }}"
|
||||
wx:for-item="tag"
|
||||
wx:key="*this"
|
||||
>{{ tag }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务区域 / 语言:单行小字,用细竖线分隔(不用中点字符) -->
|
||||
<view class="staff-area" wx:if="{{ item.areaText || item.langText }}">
|
||||
<text class="staff-area-text" wx:if="{{ item.areaText }}">服务区域 {{ item.areaText }}</text>
|
||||
<view class="area-sep" wx:if="{{ item.areaText && item.langText }}"></view>
|
||||
<text class="staff-area-text" wx:if="{{ item.langText }}">语言 {{ item.langText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 说明:交代字段口径,同时暗示「不展示联系方式」是有意为之,而非信息缺失 -->
|
||||
<view class="notice" wx:if="{{ !loading }}">
|
||||
<text class="notice-text">以上为陪同人员信息公示,用于核对身份与从业信息,不含联系方式。</text>
|
||||
</view>
|
||||
|
||||
<view class="footer-space"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,232 @@
|
||||
/* pages/attendant/attendantlist.wxss
|
||||
陪诊师公示页:与首页、陪诊指南页、联系我们页共用同一套暖橙 + 暖白令牌。
|
||||
本页原有的 page 级令牌副本(停在旧值 #C2410C / #9A3412)已按
|
||||
DESIGN.md §5.1 删掉,改用 app.wxss 的唯一来源(#B8520A / #9B4508) */
|
||||
page {
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
.page-bg {
|
||||
min-height: 100vh;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 32rpx 32rpx 0;
|
||||
}
|
||||
|
||||
/* ===== 头部:小色带 + 深墨标题 ===== */
|
||||
.page-header {
|
||||
padding: 24rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.header-accent {
|
||||
width: 64rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 4rpx;
|
||||
background: var(--brand-strong);
|
||||
}
|
||||
|
||||
.header-title {
|
||||
display: block;
|
||||
margin-top: 20rpx;
|
||||
font-size: 46rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
display: block;
|
||||
margin-top: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 加载 / 空状态 ===== */
|
||||
.state {
|
||||
padding: 120rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* ===== 陪诊师卡片:发丝边 + 紧阴影,与首页白卡同语言 ===== */
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.staff-card {
|
||||
padding: 28rpx 26rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.staff-card + .staff-card {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
/* stretch 而非 center:让文字块与 160rpx 的头像同高,
|
||||
由 .staff-main 内部用 space-between 把行铺满,
|
||||
否则文字块居中后,头像下半部右侧会留出一片空白 */
|
||||
.staff-head {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.staff-avatar {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 40rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 无头像兜底:浅橙衬底 + 姓氏首字。
|
||||
box-sizing 必须显式声明,否则 2rpx 描边会把 160rpx 撑成 164rpx */
|
||||
.staff-avatar-fallback {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
}
|
||||
|
||||
.staff-avatar-text {
|
||||
font-size: 60rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.staff-main {
|
||||
/* min-width: 0 让长内容可收缩,避免把右侧徽标与箭头挤出行外 */
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 20rpx;
|
||||
/* 纵向两行铺满头像高度:姓名行贴顶、从业信息贴底 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.staff-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.staff-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* 资质徽标:浅橙衬底 + 暖橙图标,不引入新的色相 */
|
||||
.staff-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
margin-left: 14rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
}
|
||||
|
||||
.staff-badge-text {
|
||||
margin-left: 4rpx;
|
||||
/* 中文最小 24rpx(12px),低于此不达可读下限 */
|
||||
font-size: 24rpx;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
/* 竖向位置交给 .staff-main 的 space-between,
|
||||
这里不再加 margin-top,免得和铺满逻辑叠加 */
|
||||
.staff-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.staff-meta-text {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* 竖分隔线:与场景行、页脚同一档 --sep,
|
||||
比 --line 深一档,保证在浅橙底与白卡上都看得见 */
|
||||
.meta-sep {
|
||||
width: 2rpx;
|
||||
height: 20rpx;
|
||||
flex-shrink: 0;
|
||||
margin: 0 14rpx;
|
||||
background: var(--sep);
|
||||
}
|
||||
|
||||
/* ===== 擅长场景标签(已在头像右侧文字列内,排在从业信息下方) ===== */
|
||||
.staff-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 作为 .staff-main 的第三行:这里只负责与从业信息的最小间距,
|
||||
竖向富余空间交给 .staff-main 的 space-between 分配。
|
||||
列宽只有约 414rpx,3 个标签通常会折成两行 */
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.staff-tag {
|
||||
margin: 0 12rpx 12rpx 0;
|
||||
padding: 6rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
font-size: 24rpx;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
/* ===== 服务区域 / 语言 ===== */
|
||||
.staff-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* border-top 画在元素上边缘,padding-top 是线内侧的空隙,
|
||||
所以线外侧与照片的间距只能用 margin-top 给。
|
||||
标签行从卡片主体移入头部后,原本垫在线上的那层间距没了,
|
||||
不补这里就会让照片底线直接贴住这条发丝线 */
|
||||
margin-top: 24rpx;
|
||||
padding-top: 16rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.staff-area-text {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.area-sep {
|
||||
width: 2rpx;
|
||||
height: 20rpx;
|
||||
flex-shrink: 0;
|
||||
margin: 0 14rpx;
|
||||
background: var(--sep);
|
||||
}
|
||||
|
||||
/* ===== 底部说明 ===== */
|
||||
.notice {
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.notice-text {
|
||||
font-size: 24rpx;
|
||||
line-height: 1.6;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.footer-space {
|
||||
height: 48rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user