优化
This commit is contained in:
@@ -16,6 +16,7 @@ Page({
|
||||
data_list_3: [],
|
||||
data_list_4: [],
|
||||
data_list_5: [],
|
||||
data_list_5_loading: false,
|
||||
conversationList: [],
|
||||
message_inquiry_type: 99999,
|
||||
now_message_inquiry_type: 5,
|
||||
@@ -395,7 +396,7 @@ Page({
|
||||
if(payload) {
|
||||
console.log("payload: ",payload.data);
|
||||
let payloadJson = JSON.parse(payload.data);
|
||||
text = payloadJson.title.replaceAll(/-/g, "").replaceAll(/—/g, "");
|
||||
text = payloadJson.title.replaceAll(/—/g, "");
|
||||
}
|
||||
lastMessage.messageForShow = text;
|
||||
}
|
||||
@@ -468,18 +469,19 @@ Page({
|
||||
show: false
|
||||
})
|
||||
|
||||
console.log("开始订阅消息");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||
success (res) {
|
||||
console.log(res);
|
||||
let from_account = e.currentTarget.dataset.from_account;
|
||||
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
||||
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||
app.go(url);
|
||||
}
|
||||
})
|
||||
// console.log("开始订阅消息");
|
||||
// wx.requestSubscribeMessage({
|
||||
// tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||
// success (res) {
|
||||
// console.log(res);
|
||||
// }
|
||||
// })
|
||||
|
||||
let from_account = e.currentTarget.dataset.from_account;
|
||||
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
||||
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||
app.go(url);
|
||||
},
|
||||
postDoctorInquiry(e){
|
||||
this.setData({
|
||||
@@ -553,6 +555,7 @@ Page({
|
||||
let data_list_5 = this.data.data_list_5;
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
this.setData({data_list_5_loading: true})
|
||||
api.getDoctorInquiryFinishMessage(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
@@ -563,6 +566,11 @@ Page({
|
||||
last_page: response.data.last_page
|
||||
})
|
||||
// this.selectComponent('#tabs').resize();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}).then(res =>{
|
||||
this.setData({ data_list_5_loading: false})
|
||||
}).catch(errors => {
|
||||
this.setData({ data_list_5_loading: false})
|
||||
console.error(errors);
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -12,7 +12,8 @@
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-loading": "@vant/weapp/loading/index"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 100
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty" wx:if="{{ has_data==false }}" >
|
||||
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/wnzhen_empty.png" fit="heightFix" height="108rpx" aria-label="empty" />
|
||||
<view class="empty_note">未收到任何消息</view>
|
||||
<view class="empty" wx:if="{{ has_data==false }}" >
|
||||
<view wx:if="{{!data_list_5_loading}}" class="empty_box">
|
||||
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/wnzhen_empty.png" fit="heightFix" height="108rpx" aria-label="empty" />
|
||||
<view class="empty_note">未收到任何消息</view>
|
||||
</view>
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</view>
|
||||
<!-- <van-button color="#3CC7C0" custom-style="width: 92vw;margin: 0 auto;border-radius: 10rpx;" block wx:if="{{ !has_data }}">开通图文问诊</van-button> -->
|
||||
|
||||
@@ -347,6 +350,9 @@
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%;text-align: center;">
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_5.length == 0}}" />
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_5.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</van-tab>
|
||||
|
||||
@@ -136,4 +136,9 @@ page{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
|
||||
.empty_box{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user