[update] 修改变更21样式调整

This commit is contained in:
lideqin
2023-07-19 14:20:34 +08:00
parent 47ad8b2f3f
commit 6541ce94f4
3 changed files with 61 additions and 15 deletions
+23 -1
View File
@@ -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) {
+32 -13
View File
@@ -74,18 +74,18 @@
<text class="status" wx:if="{{item.readFlag == 0}}"></text>
</view>
</view>
</view>
<!-- 公告列表 -->
<view class="list-content" wx:if="{{noticeList && noticeList.length && tabActiveKey === 'notice'}}">
<view class="list-content-item" wx:for="{{noticeList}}" wx:key="item" wx:for-item="item" bindtap="showNoticeDialog"
data-message="{{item}}">
<view class="content-top">
<view>
<text>{{item.noticeName}}</text>
<!-- 公告列表 -->
<view class="list-content" wx:if="{{noticeList && noticeList.length && tabActiveKey === 'notice'}}">
<view class="list-content-item" wx:for="{{noticeList}}" wx:key="item" wx:for-item="item" bindtap="showNoticeDialog"
data-message="{{item}}">
<view class="content-top">
<view>
<text class="green">{{item.noticeName}}</text>
</view>
<text class="content-time">{{item.createTime}}</text>
</view>
<text class="content-time">{{item.createTime}}</text>
<rich-text class="content-bottom" nodes="{{item.noticeContent}}"></rich-text>
</view>
<rich-text class="content-bottom" nodes="{{item.noticeContent}}"></rich-text>
</view>
</view>
</view>
@@ -100,9 +100,9 @@
<view class="modal-mask" bindtap="hideModal" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
<view class="modal-dialog" wx:if="{{showModal}}">
<view class="modal-img">
<image src="../../assets/images/msg.png" style="width:200rpx;height:200rpx; position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);"></image>
</view>
<view class="modal-img">
<image src="../../assets/images/msg.png" style="width:200rpx;height:200rpx; position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);"></image>
</view>
<view class="modal-content">
<!-- {{content}} -->
<view class="title">{{clickItem.currentTarget.dataset.message.titile_dictText}}</view>
@@ -123,4 +123,23 @@
</view>
</view>
<view class="modal-mask" bindtap="hideNoticeModal" catchtouchmove="preventTouchMove" wx:if="{{showNoticeModal}}"></view>
<view class="modal-dialog" wx:if="{{showNoticeModal}}">
<view class="modal-img">
<image src="../../assets/images/msg.png" style="width:200rpx;height:200rpx; position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);"></image>
</view>
<view class="modal-content">
<!-- {{content}} -->
<!-- <view class="title">{{clickItem.currentTarget.dataset.message.noticeName}}</view>-->
<view class="title">公告</view>
<!-- rich-text 会解析html模板中的html标签 -->
<view> <rich-text nodes="{{content}}"></rich-text></view>
</view>
<!-- 普通消息的显示 -->
<view class="modal-footer notice-modal-footer">
<!-- <view class="btn-cancel" bindtap="hideModal" data-status="cancel">我知道了</view>-->
<image src="../../assets/images/close.png" class="close-img" bindtap="hideNoticeModal"></image>
</view>
</view>
</view>
+6 -1
View File
@@ -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;