在线问诊默认不能选择到店,聊天UI优化
This commit is contained in:
@@ -22,15 +22,15 @@
|
|||||||
<view class="detail-grid">
|
<view class="detail-grid">
|
||||||
<view class="detail-row">
|
<view class="detail-row">
|
||||||
<text class="label">职称</text>
|
<text class="label">职称</text>
|
||||||
<text class="value tag-value">主任医师</text>
|
<text class="value tag-value">{{ doctorDetailInfo.title || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail-row">
|
<view class="detail-row">
|
||||||
<text class="label">医院</text>
|
<text class="label">医院</text>
|
||||||
<text class="value">北京协和医院</text>
|
<text class="value">{{ doctorDetailInfo.hospital || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail-row full-width">
|
<view class="detail-row full-width">
|
||||||
<text class="label">擅长</text>
|
<text class="label">擅长</text>
|
||||||
<text class="value desc-value">冠心病、高血压、心力衰竭、心律失常的诊断与药物治疗</text>
|
<text class="value desc-value">{{ doctorDetailInfo.good_at || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -185,6 +185,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
doctorUserInfo: { id: 0, avatar: '', nick_name: '医生', room_id: '' },
|
doctorUserInfo: { id: 0, avatar: '', nick_name: '医生', room_id: '' },
|
||||||
|
doctorDetailInfo: { title: '', hospital: '', good_at: '' }, // 医生详情信息
|
||||||
showDoctorDetail: false,
|
showDoctorDetail: false,
|
||||||
currentUserId: '',
|
currentUserId: '',
|
||||||
doctorId: 'doctor-1',
|
doctorId: 'doctor-1',
|
||||||
@@ -236,10 +237,11 @@ export default {
|
|||||||
|
|
||||||
if (option.room_id) this.fetchRoomStatus(option.room_id);
|
if (option.room_id) this.fetchRoomStatus(option.room_id);
|
||||||
|
|
||||||
|
// 无论是否有nickName,都需要获取医生详情信息(职称、医院、擅长)
|
||||||
|
this.fetchDoctorInfo(doctorId);
|
||||||
|
|
||||||
const nickName = this.doctorUserInfo.nick_name;
|
const nickName = this.doctorUserInfo.nick_name;
|
||||||
if (!nickName || nickName === 'undefined' || nickName === 'null') {
|
if (nickName && nickName !== 'undefined' && nickName !== 'null') {
|
||||||
this.fetchDoctorInfo(doctorId);
|
|
||||||
} else {
|
|
||||||
uni.setNavigationBarTitle({ title: `与${nickName}医生的对话` });
|
uni.setNavigationBarTitle({ title: `与${nickName}医生的对话` });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,6 +367,12 @@ export default {
|
|||||||
nick_name: doctorInfo.nick_name || '医生',
|
nick_name: doctorInfo.nick_name || '医生',
|
||||||
avatar: doctorInfo.avatar || this.doctorAvatar,
|
avatar: doctorInfo.avatar || this.doctorAvatar,
|
||||||
};
|
};
|
||||||
|
// 保存完整的医生详情信息
|
||||||
|
this.doctorDetailInfo = {
|
||||||
|
title: doctorInfo.title || '',
|
||||||
|
hospital: doctorInfo.hospital || '',
|
||||||
|
good_at: doctorInfo.good_at || ''
|
||||||
|
};
|
||||||
if (doctorInfo.avatar) this.doctorAvatar = doctorInfo.avatar;
|
if (doctorInfo.avatar) this.doctorAvatar = doctorInfo.avatar;
|
||||||
uni.setNavigationBarTitle({ title: `与${this.doctorUserInfo.nick_name}医生的对话` });
|
uni.setNavigationBarTitle({ title: `与${this.doctorUserInfo.nick_name}医生的对话` });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user