This commit is contained in:
haomingming
2023-04-08 09:51:45 +08:00
parent 6fa2a5eaa9
commit 3f40c4c237
69 changed files with 1274 additions and 338 deletions
+111 -1
View File
@@ -14,6 +14,11 @@ Page({
total: 0,
per_page: 0,
last_page: 0,
contactKeFu: false,
confirmBtn: {
"openType": "contact",
"content": "确认",
}
},
onShow(){
this.getList();
@@ -46,6 +51,111 @@ Page({
putMessageReadNoticeAll(){
api.putMessageReadNoticeAll({notice_type: 1}).then(response => {
console.log(response);
let new_list = [];
this.data.list.forEach(item => {
item.read_status = 1;
new_list.push(item)
})
this.setData({
list: new_list
})
let usertype = wx.getStorageSync('usertype');
let userID = wx.getStorageSync('user_id_'+usertype);
wx.setStorageSync( userID+"_service_notice_unreadnnum", "");
wx.showToast({
title: '操作成功',
icon: "success"
})
}).catch(errors => {console.error(errors);})
}
},
putMessageReadNotice(notice_id){
api.putMessageReadNotice({notice_id: notice_id}).then(response => {
console.log(response);
}).catch(errors => {console.error(errors);})
},
go(e){
let item = e.currentTarget.dataset.item;
this.putMessageReadNotice(item.notice_id);
console.log(item);
let link_type = item.link_type;
link_type = Number(link_type);
// 跳转页面类型(1:聊天详情页 2:问诊结束列表页 3:问诊消息列表页 4:我的名片 5:我的简介 6:我的账户 7:我的福利 8:药品订单详情页 9:物流详情 10:问诊订单详情 11:联系客服 12:协议详情 13:处方详情)
switch (link_type) {
case 1:
let from_account = item.link_params.from_account;
let order_inquiry_id = item.link_params.order_inquiry_id;
let inquiry_type = item.link_params.inquiry_type;
let url = "/Pages/yishi/chat/index?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
app.go(url);
break;
case 2:
wx.showToast({
title: '暂无页面',
icon: 'error'
})
break;
case 3:
wx.switchTab({
url: "/Pages/yishi/wenzhen_v2/wenzhen",
})
break;
case 4:
app.go("/Pages/yishi/mycard/index")
break;
case 5:
app.go("/Pages/yishi/myprofile/index")
break;
case 6:
app.go("/Pages/yishi/myaccount/index")
break;
case 7:
wx.showToast({
title: '暂无页面',
icon: 'error'
})
break;
case 8:
wx.showToast({
title: '暂无页面',
icon: 'error'
})
break;
case 9:
wx.showToast({
title: '暂无页面',
icon: 'error'
})
break;
case 10:
wx.showToast({
title: '暂无页面',
icon: 'error'
})
break;
case 11:
this.setData({
contactKeFu: true
})
break;
case 12:
wx.showToast({
title: '暂无页面',
icon: 'error'
})
break;
case 13:
let url1 = "/Pages/yishi/onlinechufang/index?order_inquiry_id="+item.link_params.order_inquiry_id+"&order_prescription_id="+item.link_params.order_prescription_id+"&from=chat";
app.go(url1);
break;
default:
break;
}
},
cancelContactDialog(){
console.log("cancelContactDialogcancelContactDialogcancelContactDialog");
this.setData({
contactKeFu: false
})
},
})
+2 -1
View File
@@ -4,7 +4,8 @@
"te-nav-bar": "/commpents/te_navbar",
"van-image": "@vant/weapp/image/index",
"van-divider": "@vant/weapp/divider/index",
"van-empty": "@vant/weapp/empty/index"
"van-empty": "@vant/weapp/empty/index",
"t-dialog": "tdesign-miniprogram/dialog/dialog"
},
"enablePullDownRefresh": false,
"onReachBottomDistance": 50
+27 -55
View File
@@ -1,80 +1,52 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<view class="list">
<view class="item" wx:for="{{list}}">
<view class="item" wx:for="{{list}}" bindtap="go" data-item="{{item}}">
<view class="item_top">
<view class="item_img" wx:if="{{item.inquiry_type == 1}}">
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 1}}">
<text style="margin-left: 10rpx;">快速问诊</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/kuaisu.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_img" wx:if="{{item.inquiry_type == 2}}">
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 2}}">
<text style="margin-left: 10rpx;">快速问诊</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/kuaisu.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_img" wx:if="{{item.inquiry_type == 3}}">
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 3}}">
<text style="margin-left: 10rpx;">公益问诊</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/yizhen.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_img" wx:if="{{item.inquiry_type == 4}}">
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 4}}">
<text style="margin-left: 10rpx;">问诊购药</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/drug.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_date">{{item.notice_send_time}}</view>
</view>
<view class="item_content">{{item.notice_title}}</view>
<view class="item_content">
{{item.notice_brief_title}}
<view class="hongdian" wx:if="{{item.read_status == 0}}">
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/honhdian.png" fit="heightFix" height="20rpx" aria-label="qrcode" />
</view>
</view>
</view>
<!-- <view class="item">
<view class="item_top">
<view class="item_img">
<text style="margin-left: 10rpx;">快速问诊</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/kuaisu.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_date">2023-1-02 12:22</view>
</view>
<view class="item_content">您有新的图文问诊咨询,请注意查看。</view>
</view> -->
<!-- <view class="item">
<view class="item_top">
<view class="item_img">
<text style="margin-left: 10rpx;">在线问诊</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/online.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_date">2023-1-02 12:22</view>
</view>
<view class="item_content">您有新的图文问诊咨询,请注意查看。</view>
</view> -->
<!-- <view class="item">
<view class="item_top">
<view class="item_img">
<text style="margin-left: 10rpx;">公益问诊</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/yizhen.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_date">2023-1-02 12:22</view>
</view>
<view class="item_content">您有新的图文问诊咨询,请注意查看。</view>
</view> -->
<!-- <view class="item">
<view class="item_top">
<view class="item_img">
<text style="margin-left: 10rpx;">问诊购药</text>
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/drug.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view>
<view class="item_date">2023-1-02 12:22</view>
</view>
<view class="item_content">您有新的图文问诊咨询,请注意查看。</view>
</view> -->
</view>
<van-empty description="暂无数据" wx:if="{{list.length == 0}}" />
<van-divider contentPosition="center" wx:if="{{list.length > 0 && current_page == last_page}}">到底了~</van-divider>
<van-image bind:click="putMessageReadNoticeAll" style="position: fixed; right: 0;bottom: 262rpx;" src="https://img.applets.igandanyiyuan.com/applet/doctor/static/images/yishi/service_notice/readall.png" fit="heightFix" height="84rpx" aria-label="role" />
<view style="height: 50rpx;">
<view style="height: 50rpx;"></view>
<t-dialog
visible="{{ contactKeFu }}"
title="立即联系客服"
confirm-btn="{{confirmBtn}}"
close-on-overlay-click="{{true}}"
close="cancelContactDialog"
overlay-click="cancelContactDialog"
>
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelContactDialog">
取消
</view>
<!-- <view slot="confirm-btn" class="dialog dialog_confirm_btn" open-type="contact">
<t-button theme="primary" size="large" open-type="contact">确认</t-button>
</view> -->
</t-dialog>
</view>
+27
View File
@@ -37,8 +37,35 @@ page{
margin-top: 20rpx;
font-size: 30rpx;
color: #666666;
display: flex;
align-items: center;
}
.van_img{
display: flex;
justify-content: center;
}
.hongdian{
height: 50rpx;
display: flex;
align-items: center;
flex: 1;
display: flex;
justify-content: flex-end;
}
.dialog{
width: 50%;
text-align: center;
height: 100rpx;
line-height: 100rpx;
}
.dialog_cancel_btn{
border-top: 1px solid #E9E9E9;
border-right: 1px solid #E9E9E9;
}
.dialog_confirm_btn{
border-top: 1px solid #E9E9E9;
color: #3CC7C0;
}
.t-button__content{
color: #3CC7C0 !important;
}