feat(attendant): 展示实习/正式身份与实习只读提示

- 角色解析缓存陪诊师阶段与等级,实习仍可进入工作台

- 首页与个人中心展示身份文案,实习期给出不能接单的提示

- 申请页文案说明审核通过后为实习陪诊师、转正后可接单
This commit is contained in:
lik
2026-11-10 12:02:08 +08:00
parent a8b896846b
commit 51b6ef497b
7 changed files with 104 additions and 12 deletions
+9 -3
View File
@@ -35,11 +35,12 @@ Page({
recentOrders: [],
role: '',
isAdmin: false,
isIntern: false,
levelText: '',
quickEntries: [],
online: true,
profile: {
name: '',
level: '初级陪诊师',
avatar: ''
},
todayIncome: 0,
@@ -84,11 +85,16 @@ Page({
* 先解析角色再取数:管理员看全量,陪诊员只看本人订单
*/
init() {
return role.ensureRole()
.then(r => {
return role.ensureRoleSafe()
.then((detail) => {
const r = detail.role
const attendant = detail.attendant || null
this.setData({
role: r,
isAdmin: r === 'admin',
// 实习陪诊师可进工作台查看,但不能接单:首页给一条只读提示
isIntern: !!(attendant && attendant.stage === 'intern'),
levelText: r === 'admin' ? '管理员' : (attendant ? attendant.text : ''),
quickEntries: r === 'admin' ? ADMIN_ENTRIES : (r === 'attendant' ? ATTENDANT_ENTRIES : [])
})
this.loadUser()
+8 -2
View File
@@ -11,8 +11,8 @@
<view class="profile-info">
<view class="name-row">
<text class="name">{{profile.name}}</text>
<view class="level-tag">
<text class="level-text">{{profile.level}}</text>
<view class="level-tag" wx:if="{{levelText}}">
<text class="level-text">{{levelText}}</text>
</view>
</view>
<text class="greeting">{{greeting}},{{todayText}}</text>
@@ -45,6 +45,12 @@
</view>
</view>
<!-- 实习期只读提示 -->
<view class="intern-tip" wx:if="{{isIntern}}">
<t-icon name="info-circle" size="32rpx" color="#C26A2E" />
<text class="intern-tip-text">实习期可查看订单,暂不能接单;管理员转正后即可接单。</text>
</view>
<!-- 快捷入口 -->
<view class="section">
<text class="section-title">快捷入口</text>
+18
View File
@@ -118,6 +118,24 @@ page {
color: rgba(255, 255, 255, 0.65);
}
/* === 实习期只读提示 === */
.intern-tip {
display: flex;
align-items: center;
margin-top: 20rpx;
padding: 18rpx 24rpx;
background-color: #FBEFE4;
border: 1rpx solid #EBD3BE;
border-radius: 20rpx;
}
.intern-tip-text {
margin-left: 12rpx;
font-size: 24rpx;
line-height: 1.5;
color: #8A5A32;
}
.online-switch {
display: flex;
align-items: center;