feat(attendant): 陪诊师列表展示性别

公示接口改为返回实名后,列表在从业年限前补充性别,便于用户下单前快速筛选。
This commit is contained in:
lik
2026-11-11 21:03:49 +08:00
parent d6d5cc732d
commit 6a2a5e7775
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -58,7 +58,7 @@ Page({
} }
}, },
// 公示接口已脱敏,这里只补展示用字段,不再加工姓名 // 公示接口返回姓名,这里只补展示用字段
decorate(item) { decorate(item) {
const name = item.name || '' const name = item.name || ''
const specialties = item.specialties || [] const specialties = item.specialties || []
@@ -66,6 +66,7 @@ Page({
return { return {
...item, ...item,
initial: name.replace(/[**]/g, '').slice(0, 1) || '陪', initial: name.replace(/[**]/g, '').slice(0, 1) || '陪',
sexText: { male: '男', female: '女' }[item.sex] || '',
specialties: specialties.slice(0, 3), specialties: specialties.slice(0, 3),
areaText: serviceAreas.join('、') areaText: serviceAreas.join('、')
} }
+1 -1
View File
@@ -29,7 +29,7 @@
<text class="attendant-name">{{ item.name }}</text> <text class="attendant-name">{{ item.name }}</text>
<text class="order-count">已接 {{ item.orderCount }} 单</text> <text class="order-count">已接 {{ item.orderCount }} 单</text>
</view> </view>
<text class="attendant-meta">从业 {{ item.workYears }} 年{{ item.areaText ? ' · ' + item.areaText : '' }}</text> <text class="attendant-meta">{{ item.sexText ? item.sexText + ' · ' : '' }}从业 {{ item.workYears }} 年{{ item.areaText ? ' · ' + item.areaText : '' }}</text>
<view class="tag-row" wx:if="{{item.specialties.length}}"> <view class="tag-row" wx:if="{{item.specialties.length}}">
<text class="tag" wx:for="{{item.specialties}}" wx:for-item="tag" wx:key="*this">{{ tag }}</text> <text class="tag" wx:for="{{item.specialties}}" wx:for-item="tag" wx:key="*this">{{ tag }}</text>
</view> </view>