1.22
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
// pages/fuliMsgList/fuliMsgList.js
|
||||
const app = getApp()
|
||||
import { hasRead,getMsg} from "../../../api/msg"
|
||||
import {throttle} from "../../../utils/util"
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
list:[],
|
||||
isLock:false,
|
||||
isTriggered:false,
|
||||
page:1,
|
||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
|
||||
pageNumber:10
|
||||
},
|
||||
handleGo:throttle(function(event){
|
||||
let link_type=event.currentTarget.dataset.type;
|
||||
let index=event.currentTarget.dataset.index;
|
||||
let link_params=event.currentTarget.dataset.params;
|
||||
let id=event.currentTarget.dataset.id;
|
||||
let status=event.currentTarget.dataset.status;
|
||||
hasRead(id).then(data=>{
|
||||
let currentItem=`list[${index}].read_status`
|
||||
if(status==0){
|
||||
this.setData({
|
||||
[currentItem]:1
|
||||
})
|
||||
}
|
||||
this.goOther(link_type,link_params);
|
||||
})
|
||||
}),
|
||||
goBack(){
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
},
|
||||
lower(){
|
||||
if(!this.data.isLock){
|
||||
this.setData({
|
||||
page:++this.data.page
|
||||
})
|
||||
this.handleGetMsg();
|
||||
}
|
||||
},
|
||||
handleRefresher(){
|
||||
this.setData({
|
||||
page:1,
|
||||
list:[],
|
||||
isLock:false,
|
||||
})
|
||||
this.handleGetMsg();
|
||||
},
|
||||
handleGetMsg(){
|
||||
let {page,pageNumber}=this.data;
|
||||
getMsg({
|
||||
page:page,
|
||||
per_page:pageNumber,
|
||||
notice_system_type:2
|
||||
}).then(data=>{
|
||||
let result=data.data;
|
||||
if(result.length==0){
|
||||
this.setData({
|
||||
isLock:true
|
||||
})
|
||||
};
|
||||
this.setData({
|
||||
isTriggered:false,
|
||||
list:this.data.list.concat(result)
|
||||
})
|
||||
})
|
||||
},
|
||||
goOther(link_type,link_params){
|
||||
let url='';
|
||||
if(link_type==1){
|
||||
url= '/TUIService/pages/index?currentConversationID='+link_params.doctor_user_id+'&order_inquiry_id='+link_params.order_inquiry_id+'&inquiry_type='+link_params.inquiry_type;
|
||||
}else if(link_type==7){
|
||||
url='/patient/pages/myWelfare/myWelfare'
|
||||
}else if(link_type==8){
|
||||
url='/patient/pages/medinceOrder/medinceOrder'
|
||||
}else if(link_type==9){
|
||||
url='/patient/pages/medinceOrder/medinceOrder'
|
||||
}else if(link_type==10){
|
||||
url='/patient/pages/orderDetail/orderDetail?order_inquiry_id='+link_params.order_inquiry_id
|
||||
}else if(link_type==12){
|
||||
|
||||
}else if(link_type==13){
|
||||
url='/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id='+link_params.order_prescription_id
|
||||
};
|
||||
app.method.navigateTo({
|
||||
url: url,
|
||||
})
|
||||
},
|
||||
onLoad(options) {
|
||||
this.handleGetMsg()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav":"../../../components/nav/nav"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "肝胆相照互联网医院"
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<!--pages/fuliMsgList/fuliMsgList.wxml-->
|
||||
<!-- <view class="ui-navigatorbar" style="background: #FFFFFF;border-bottom: 1rpx solid #E3E4E5;">
|
||||
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
|
||||
<view class="ui-title">福利消息</view>
|
||||
</view> -->
|
||||
<nav navName="福利消息"></nav>
|
||||
<view class="page">
|
||||
<scroll-view scroll-y="true" bindscrolltolower="lower" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" class="cellbox" bindscrolltolower="lower" wx:if="{{list.length>0}}">
|
||||
<view class="cell" wx:for="{{list}}" data-index="{{index}}" data-id="{{item.notice_id}}" wx:key="notice_id" bindtap="handleGo" data-type="{{item.link_type}}" data-params="{{item.link_params}}" data-status="{{item.read_status}}">
|
||||
<view class="date">{{item.notice_send_time}}</view>
|
||||
<view class="board">
|
||||
<view class="titlebox">
|
||||
<image src="{{img_host+'/youhuiquan.png'}}" class="icon"></image>
|
||||
<view class="name">{{item.notice_title}}</view>
|
||||
<view class="circle" wx:if="{{item.read_status==0}}"></view>
|
||||
</view>
|
||||
<view class="detail">{{item.notice_content}}</view>
|
||||
<view class="bottom">
|
||||
<view class="look">点击查看</view>
|
||||
<image src="{{img_host+'/ricon.png'}}" class="righticon"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="nonedata" wx:else>暂无数据!</view>
|
||||
</view>
|
||||
@@ -0,0 +1,92 @@
|
||||
/* pages/fuliMsgList/fuliMsgList.wxss */
|
||||
.page{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.cellbox{
|
||||
flex:1;
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin-top: 172rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
}
|
||||
.nonedata{
|
||||
margin-top: 172rpx;
|
||||
}
|
||||
.cell{
|
||||
margin: 30rpx 32rpx 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.cell .date{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
padding:0 20rpx;
|
||||
background: #E1E1E1;
|
||||
}
|
||||
.titlebox .icon{
|
||||
margin-top: 8rpx;
|
||||
width:60rpx;
|
||||
height:46rpx;
|
||||
}
|
||||
.titlebox{
|
||||
position: relative;
|
||||
padding:20rpx;
|
||||
display: flex;
|
||||
align-items:flex-start;
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
}
|
||||
.circle{
|
||||
top:5rpx;
|
||||
right:10rpx;
|
||||
width:20rpx;
|
||||
position: absolute;
|
||||
height:20rpx;
|
||||
border-radius: 50%;
|
||||
background-color: rgba(239, 79, 32, 1);
|
||||
}
|
||||
.board{
|
||||
padding-top:20rpx;
|
||||
margin-top: 36rpx;
|
||||
width:100%;
|
||||
padding-bottom: 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.board .name{
|
||||
margin-left: 10rpx;
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.board .detail{
|
||||
font-size: 28rpx;
|
||||
padding:20rpx;
|
||||
color: #666666;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
.board .bottom{
|
||||
padding:0 20rpx;
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.bottom .righticon{
|
||||
width:16rpx;
|
||||
height:32rpx;
|
||||
}
|
||||
.nonedata{
|
||||
min-height:600rpx;
|
||||
}
|
||||
.board .titlebox{
|
||||
align-items: center;
|
||||
}
|
||||
Reference in New Issue
Block a user