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:
@@ -132,6 +132,10 @@
|
||||
|
||||
<!-- 按钮区完全保留你原有的判断逻辑 -->
|
||||
<view class="choose_btn">
|
||||
<view class="order_info active" v-if="item.is_pay==0 && item.status==0 && item.cancel_status==0"
|
||||
@tap.stop="goCancel(item.id)">
|
||||
取消
|
||||
</view>
|
||||
<view class="order_info active" v-if="item.status==1 && item.is_pay==1 && item.forbiddenRefund==0"
|
||||
@tap.stop="toCancel(item.id,item.status,refundType)">
|
||||
退款
|
||||
@@ -164,10 +168,6 @@
|
||||
查看物流
|
||||
</view>
|
||||
|
||||
<view class="order_info active" v-if="item.is_pay==0 && item.status==0 && item.cancel_status==0"
|
||||
@tap.stop="goCancel(item.id)">
|
||||
取消
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadMoreStatus" v-if="orderList.length!=0" margin-top="30" margin-bottom="30" />
|
||||
|
||||
@@ -91,10 +91,26 @@
|
||||
this.mobile = res.data.data.user.mobile
|
||||
this.idCard = res.data.data.user.idcard
|
||||
this._securityBaseline = { name: this.name }
|
||||
// 写回本地 userinfo,保证聊天室等页面能读到最新头像
|
||||
this.syncUserinfoStorage(res.data.data.user)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 将最新用户资料合并进本地 userinfo(尤其是 avatarurl)
|
||||
* 登录时存的是整份 user,此处只覆盖接口返回的字段,避免丢掉其它缓存键
|
||||
*/
|
||||
syncUserinfoStorage(user) {
|
||||
if (!user) return
|
||||
const cached = uni.getStorageSync('userinfo') || {}
|
||||
uni.setStorageSync('userinfo', {
|
||||
...cached,
|
||||
...user,
|
||||
avatarurl: user.avatarurl || cached.avatarurl || ''
|
||||
})
|
||||
},
|
||||
|
||||
// 点击头像触发click事件 changeUserPhoto
|
||||
async changeUserPhoto() {
|
||||
console.log('进入更新头像的功能')
|
||||
@@ -198,6 +214,13 @@
|
||||
icon: "success",
|
||||
title: '保存成功'
|
||||
})
|
||||
// 先写回 storage,再拉详情,避免聊天页 onShow 读到旧头像
|
||||
const cached = uni.getStorageSync('userinfo') || {}
|
||||
uni.setStorageSync('userinfo', {
|
||||
...cached,
|
||||
avatarurl: req.data.url
|
||||
})
|
||||
this.avatar = req.data.url
|
||||
this.getInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<image :src="data.store['offical_seal'] ||''" mode=""></image>
|
||||
<view class="record_yard">
|
||||
<view class="yard">
|
||||
{{data.store.name}}
|
||||
{{ storeDisplayName }}
|
||||
</view>
|
||||
<view class="state">
|
||||
处方笺
|
||||
@@ -359,8 +359,16 @@
|
||||
getUseWay
|
||||
} from '../../request/api/api'
|
||||
import { checkImageUrl } from '../../utils/utils'
|
||||
import { formatStoreNameWithHu } from '../../utils/formatStoreNameWithHu.js'
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
/** 在线处方诊所名加(互) */
|
||||
storeDisplayName() {
|
||||
const store = this.data && this.data.store ? this.data.store : {}
|
||||
return formatStoreNameWithHu(store.name, this.data && this.data.is_online)
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusName: {
|
||||
|
||||
Reference in New Issue
Block a user