更新小程序仓库

This commit is contained in:
zoujiandong
2023-11-17 09:51:35 +08:00
parent 13f54a26df
commit 4506940c2d
936 changed files with 60022 additions and 0 deletions
+128
View File
@@ -0,0 +1,128 @@
// pages/sysMsgDetail/sysMsgDetail.js
const app = getApp()
import {
lastMsg,
allRead,
} from "../../api/msg"
import {throttle} from "../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
msg:{},
isTriggered:false,
count:0,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
getLastMsg(){
lastMsg().then(data=>{
let count=0;
for (const key in data) {
let item='msg.'+key
count=count+data[key].count;
this.setData({
[item]:data[key],
isTriggered:false,
count:count
})
};
})
},
HnaleAllRead(){
allRead({
notice_type:3
}).then(data=>{
this.getLastMsg();
wx.showToast({
title: '一键已读成功',
icon:"none"
})
})
},
goServiceList:throttle(function(){
app.method.navigateTo({
url: '/pages/sysMsgList/sysMsgList',
})
}),
gofuliMsgList:throttle(function(){
app.method.navigateTo({
url: '/pages/fuliMsgList/fuliMsgList',
})
}),
goBack(){
wx.navigateBack({
delta: 1,
})
},
handleRefresher(){
this.getLastMsg();
},
goExpress:throttle(function(){
app.method.navigateTo({
url: '/pages/refundMsgList/refundMsgList?type=express',
})
}),
refundMsgList:throttle(function(){
app.method.navigateTo({
url: '/pages/refundMsgList/refundMsgList',
})
}),
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
//this.getLastMsg()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
})
this.getLastMsg()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"nav":"../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+55
View File
@@ -0,0 +1,55 @@
<!--pages/sysMsgDetail/sysMsgDetail.wxml-->
<wxs src="../../filters/filter.wxs" module="filters"></wxs>
<nav navName="系统消息"></nav>
<view class="page">
<scroll-view class="boxcon" scroll-y="true" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true">
<view class="toptip" bindtap="goServiceList">
<image src="{{img_host+'/servicemsg.png'}}" alt="" class="bell" ></image>
<view class="msg">
<view class="titlebox">
<view class="title">服务消息</view>
<view class="circle" wx:if="{{msg.service.count==1}}"></view>
<view class="bage" wx:elif="{{msg.service.count>1 && filters.formatNumber(msg.service.count)}}">{{filters.formatNumber(msg.service.count)}}</view>
</view>
<view class="tips" wx:if="{{msg.service.info.notice_title}}">{{msg.service.info.notice_brief_title}}</view>
</view>
</view>
<view class="toptip" bindtap="gofuliMsgList">
<image src="{{img_host+'/fulimsg.png'}}" alt="" class="bell" ></image>
<view class="msg">
<view class="titlebox">
<view class="title">福利消息</view>
<view class="circle" wx:if="{{msg.benefit.count==1}}"></view>
<view class="bage" wx:elif="{{msg.benefit.count && filters.formatNumber(msg.benefit.count)}}">{{filters.formatNumber(msg.benefit.count)}}</view>
</view>
<view class="tips" wx:if="{{msg.benefit.info}}">{{msg.benefit.info.notice_brief_title}}</view>
</view>
</view>
<view class="toptip" bindtap="refundMsgList">
<image src="{{img_host+'/tuikuan.png'}}" alt="" class="bell" ></image>
<view class="msg">
<view class="titlebox">
<view class="title">退款消息</view>
<view class="circle" wx:if="{{msg.refund.count==1}}"></view>
<view class="bage" wx:elif="{{msg.refund.count>1 && filters.formatNumber(msg.refund.count)}}">{{filters.formatNumber(msg.refund.count)}}</view>
</view>
<view class="tips" wx:if="{{msg.refund.info}}">{{msg.refund.info.notice_brief_title}}</view>
</view>
</view>
<view class="toptip" bindtap="goExpress">
<image src="{{img_host+'/expressMsg.png'}}" alt="" class="bell" ></image>
<view class="msg">
<view class="titlebox">
<view class="title">物流消息</view>
<view class="circle" wx:if="{{msg.logistics.count==1}}"></view>
<view class="bage" wx:elif="{{msg.logistics.count>1 && filters.formatNumber(msg.logistics.count)}}">{{filters.formatNumber(msg.logistics.count)}}</view>
</view>
<view class="tips" wx:if="{{msg.logistics.info}}">{{msg.logistics.info.notice_brief_title}}</view>
</view>
</view></scroll-view >
<image src="{{img_host+'/allread.png'}}" class="allread" bindtap="HnaleAllRead"></image>
</view>
+76
View File
@@ -0,0 +1,76 @@
/* pages/sysMsgDetail/sysMsgDetail.wxss */
.toptip {
display: flex;
padding:30rpx 0rpx 0rpx 32rpx;
background: #FFFFFF;
}
.page{
display: flex;
flex-direction: column;
overflow: hidden;
}
.circle{
width: 20rpx;
height:20rpx;
background: #EF4F20;
border-radius: 50%;
}
.boxcon{
margin-top: 172rpx;
flex:1;
overflow-y:scroll ;
-webkit-overflow-scrolling: touch;
}
.titlebox {
display: flex;
margin-right: 32rpx;
justify-content: space-between;
}
.msg{
flex:1;
min-height: 80rpx;
padding-bottom: 30rpx;
margin-left: 20rpx;
display: flex;
flex-direction: column;
border-bottom: 1rpx solid #E3E4E5;
}
.msg .title {
font-size: 30rpx;
color: rgba(51,51,51,0.9);
}
.msg .tips {
margin-right: 32rpx;
margin-top: 10rpx;
font-size: 28rpx;
color: #666;
}
.bell{
width:60rpx;
height:60rpx;
flex-shrink: 0;
}
.bage {
min-width: 17rpx;
padding: 0 10rpx;
height: 36rpx;
display: flex;
align-items: center;
color: #fff;
justify-content: center;
border-radius: 30rpx;
font-size: 26rpx;
background: #EF4F20;
}
.allread{
position: fixed;
width:158rpx;
height:84rpx;
right:0;
bottom:200rpx;
}