From 6541ce94f4374c0a6128bb782944ca567d921544 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Wed, 19 Jul 2023 14:20:34 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E5=8F=98=E6=9B=B4?= =?UTF-8?q?21=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/home.js | 24 ++++++++++++++++++++++- pages/home/home.wxml | 45 +++++++++++++++++++++++++++++++------------- pages/home/home.wxss | 7 ++++++- 3 files changed, 61 insertions(+), 15 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index 1f2bb91..eda79de 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -37,6 +37,7 @@ Page({ showModal: false, // 是否显示弹窗 clickItem: null, signUpBool: false, // 是否跳转可报名 + showNoticeModal: false, // 是否显示公告弹窗 // 2023-07变更:添加公告面板 tabList: [ { key: 'message', tab: '消息' }, @@ -67,6 +68,26 @@ Page({ }) console.log(this.data.clickItem); }, + // 点击公告 + showNoticeDialog: function (e) { + console.log(e) + let content = e.currentTarget.dataset.message.noticeContent + const that = this + that.setData({ + showNoticeModal: true, + content: content, + clickItem: e + }) + }, + // 隐藏公告模态对话框 + hideNoticeModal: function () { + const that = this + that.setData({ + showNoticeModal: false, + content: '', + clickItem: null + }) + }, /** * 弹出框蒙层截断touchmove事件 */ @@ -141,7 +162,8 @@ Page({ title: '加载中...', icon: 'loading' }) - UserApi.noticeList(this.data.searchParams).then(res => { + const params = Object.assign({}, this.data.searchParams, {noticeStatus: 1}) + UserApi.noticeList(params).then(res => { if (res.success) { // 搜索时,把原数据清空,重新筛选 if (this.data.searchParams.pageNo === 1) { diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 18435c8..596739a 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -74,18 +74,18 @@ - - - - - - - {{item.noticeName}} + + + + + + {{item.noticeName}} + + {{item.createTime}} - {{item.createTime}} + - @@ -100,9 +100,9 @@ - - - + + + {{clickItem.currentTarget.dataset.message.titile_dictText}} @@ -123,4 +123,23 @@ + + + + + + + + + 公告 + + + + + + + + + + diff --git a/pages/home/home.wxss b/pages/home/home.wxss index e8ec78c..16c71b7 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -164,7 +164,7 @@ page{ font-size: 700; padding: 40rpx 0 15rpx 0; } -/* 这个样式没有用 不知道为啥 */ + /* 这个样式没有用 不知道为啥 */ .modal-dialog .modal-conten modal-img { position: absolute; width: 100rpx!important; @@ -179,6 +179,11 @@ page{ font-size: 32rpx; line-height: 70rpx; } +/* 公告模态框的footer */ +.notice-modal-footer { + height: 0rpx !important; + padding: 0; +} .modal-footer .close-img { position: absolute; bottom: -20rpx;