优化
This commit is contained in:
@@ -80,6 +80,21 @@ Page({
|
||||
putMessageReadNoticeAll(){
|
||||
api.putMessageReadNoticeAll({notice_type: 2}).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+"_system_notice_unreadnnum", "");
|
||||
wx.showToast({
|
||||
title: '操作成功',
|
||||
icon: "success"
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
})
|
||||
@@ -6,7 +6,7 @@
|
||||
<view class="item_img">
|
||||
<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_content">{{item.notice_title}}</view>
|
||||
<view class="item_content">{{item.notice_brief_title}}</view>
|
||||
</view>
|
||||
<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" />
|
||||
|
||||
Reference in New Issue
Block a user