From 7194f82cfdd1c14424c75c6336c6bd9289878038 Mon Sep 17 00:00:00 2001 From: fengachen <373943794@qq.com> Date: Fri, 10 Dec 2021 17:22:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8F=98=E6=9B=B4=E3=80=91=20?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=8A=A0=E8=AF=A6=E6=83=85=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/home.js | 58 +++++++++++++++++++++++++++++++++++++++++--- pages/home/home.wxml | 25 ++++++++++++++++--- pages/home/home.wxss | 42 ++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 7 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index 7cd70d3..3753bf5 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -44,7 +44,51 @@ Page({ titile: '', // 提醒类型 3:会议 6:文件 7:邮寄 8:催款 startTime: '', // 开始日期 endTime: '' // 结束日期 - } + }, + content:'',// 消息内容 + showModal:false, // 是否显示弹窗 + clickItem:null, + signUpBool:false // 是否跳转可报名 + }, + showDialogBtn: function (e) { + let content = e.currentTarget.dataset.message.msgContent + // 是否可跳转报名 + const templateCode = e.currentTarget.dataset.message.templateCode + if(templateCode === 'QY_1_HYTZ_WORK_GROUP_CREATE' || templateCode === "QY_13_HYTZ_FBW_CREATE"){ + this.setData({ + signUpBool:true + }) + }else{ + + this.setData({ + signUpBool:false + }) + } + const that = this + that.setData({ + showModal: true, + content:content, + clickItem: e + }) + }, + /** + * 弹出框蒙层截断touchmove事件 + */ + preventTouchMove: function () { + }, + /** + * 隐藏模态对话框 + */ + hideModal: function () { + const that = this + this.messageDetail(this.data.clickItem) + this.loadData() + that.setData({ + showModal: false, + content:'', + clickItem:null + }); + }, loadData() { wx.showToast({ @@ -107,7 +151,7 @@ Page({ // 会议去报名,切换已读状态 messageDetail(e) { const readFlag = e.currentTarget.dataset.message.readFlag - const templateCode = e.currentTarget.dataset.message.templateCode + if (readFlag == 0) { // 标记已读 UserApi.messageStatus({ anntId: e.currentTarget.dataset.message.anntId @@ -119,7 +163,12 @@ Page({ }) }) } - const meetingId = JSON.parse(e.currentTarget.dataset.message.busId).id + + }, + // 去报名 + goSignUpPage(){ + const templateCode = this.data.clickItem.currentTarget.dataset.message.templateCode + const meetingId = JSON.parse( this.data.clickItem.currentTarget.dataset.message.busId).id if (templateCode == 'QY_1_HYTZ_WORK_GROUP_CREATE' || templateCode == "QY_13_HYTZ_FBW_CREATE") { // 去报名页 // 需要调用会议详情的接口 判断该会议是否还在报名时间内 并跳转不同的页面或者操作 MeetingApi.meetingDetail({ @@ -132,6 +181,9 @@ Page({ wx.navigateTo({ // 这里传入的是会议id url: `../cannotSignUp/cannotSignUp`, + success: () => { + this.hideModal() + } }) } else { // 从消息报名的参会单位不可更改 diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 457fe54..7835015 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -30,7 +30,8 @@ - + 时间 {{searchParams.startTime}} @@ -41,14 +42,16 @@ - + - {{item.titile_dictText}} + {{item.titile_dictText}} {{item.sendTime}} @@ -61,4 +64,18 @@ 暂无消息通知! - + + + + + + + + 去报名 + + + 我知道了 + + + + \ No newline at end of file diff --git a/pages/home/home.wxss b/pages/home/home.wxss index fb1208d..5eac3d9 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -123,4 +123,46 @@ page{ height: 5px; background-color: #FF5E60; border-radius: 50%; +} + +.modal-mask { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + background: #000; + opacity: 0.5; + overflow: hidden; + z-index: 9000; + color: #fff; +} +.modal-dialog { + width: 540rpx; + overflow: hidden; + position: fixed; + top: 50%; + left: 0; + z-index: 9999; + background: #f9f9f9; + margin: -180rpx 105rpx; + border-radius: 8rpx; +} +.modal-content { + padding: 50rpx; + text-align: center; + color: #666 +} +.modal-footer { + height: 70rpx; + border-top: 1px solid #dedede; + font-size: 32rpx; + line-height: 70rpx; +} +.btn-cancel { + width: 100%; + color: #fff; + background: #069F99; + text-align: center; + border-right: 1px solid #dedede; } \ No newline at end of file