feat(home/chat): 列表骨架屏、聊天室己方头像与协议/医生详情优化

- 新增分包组件 ListSkeleton(doctor/message/product/article/category/zone)
- 首页/消息/资讯首次加载改用骨架屏,刷新不再清空旧数据避免闪空
  · 去掉 home getList、消息 onShow 中的数组清空
  · 三页 pages.json 增加 easycom 与 componentPlaceholder 主包异步引用
- 聊天室己方头像改为读取本地 userinfo.avatarurl(登录后微信头像),
  mycollection 上传头像成功后同步写回 storage
- 修复协议抽屉点不开:page-container 改为 v-if + :show;
  协议名单独可点节点,匹配放宽 name/desc 双向 includes
- 医生气泡头像可点击进入 doctor-detail?readonly=1 只读医生详情,
  隐藏预约挂号区
This commit is contained in:
李琦
2026-07-19 16:08:04 +08:00
parent 2c739324d6
commit 2d2a8abfd4
21 changed files with 1657 additions and 466 deletions

File diff suppressed because one or more lines are too long

View File

@@ -36,8 +36,8 @@
</view>
</view>
<!-- 到店医生 预约挂号 -->
<view class="appoin">
<!-- 到店医生 预约挂号:聊天室只读进入时不展示挂号入口 -->
<view class="appoin" v-if="!readonly">
<view class="title">预约挂号</view>
<view class="list">
<view class="yard">
@@ -121,10 +121,13 @@
registList: [],
peopleList: [],
rType: '0', // 挂号类型
// 聊天室等场景只读查看:隐藏挂号按钮区
readonly: false,
}
},
onLoad(e) {
console.log(e, 'e');
this.readonly = e.readonly === '1' || e.readonly === 1;
// 允许未登录访问,移除登录跳转
// 如果是guest模式,强制设置store_id为11001
if (isGuestMode()) {
@@ -148,7 +151,10 @@
this.doctorID = uni.getStorageSync('doctors_id')
this.getDocdetail();
this.getUser();
this.getRegist();
// 只读模式不拉号源,避免无用请求
if (!this.readonly) {
this.getRegist();
}
console.log(this.doctorID, '6666');
} else {
@@ -159,7 +165,9 @@
if (isGuestMode()) {
uni.setStorageSync('store_id', '11001');
this.getDocdetail();
this.getRegist();
if (!this.readonly) {
this.getRegist();
}
} else {
const id = e.sts_id || uni.getStorageSync('store_id')
if (id!='undefined' && id) {
@@ -179,6 +187,8 @@
},
// 挂号
goAdd() {
// 只读模式不允许挂号
if (this.readonly) return;
// 如果未登录,保存跳转信息并跳转到登录页
if (!isLoggedIn()) {
const storeId = uni.getStorageSync('store_id') || '11001';
@@ -345,8 +355,11 @@
mounted() {
this.getDocdetail();
this.getUser();
this.getRegist();
this.getPeople();
// 只读模式不拉号源/就诊人相关挂号数据
if (!this.readonly) {
this.getRegist();
this.getPeople();
}
if (!this.doctorList && doctorID) {
this.getDocdetail();