会员权益

This commit is contained in:
2026-04-29 15:33:58 +08:00
commit 54965243da
2787 changed files with 242809 additions and 0 deletions

View File

@@ -0,0 +1,118 @@
<!-- +----------------------------------------------------------------------
| 麦沃德科技赋能开发者助力商协会发展
+----------------------------------------------------------------------
| Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
+----------------------------------------------------------------------
| 沃德商协会系统并不是自由软件不加密并不代表开源未经许可不可自由转售和商用
+----------------------------------------------------------------------
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
+----------------------------------------------------------------------
| 通知详情 开发者: 麦沃德科技-半夏
+---------------------------------------------------------------------- -->
<template>
<view class="container">
<!-- 标题栏 -->
<title-bar title="通知详情"></title-bar>
<!-- 内容区 -->
<view class="container-main" v-if="loadEnd">
<view class="main-box">
<view class="box-info">
<view class="info-title">{{noticeInfo.title}}</view>
<view class="info-date">{{noticeInfo.createtime}}</view>
</view>
<view class="box-content">
<mp-html :content="noticeInfo.content"></mp-html>
</view>
</view>
</view>
<!-- 底部导航 -->
<tab-bar></tab-bar>
</view>
</template>
<script>
export default {
data() {
return {
// 加载完成
loadEnd: false,
// 通知id
noticeId: null,
// 通知详情
noticeInfo: {},
}
},
onLoad(option) {
uni.showLoading({
title: "加载中"
})
this.noticeId = option.id
this.getNoticeInfo(() => {
this.loadEnd = true
uni.hideLoading()
})
},
methods: {
// 获取通知详情
getNoticeInfo(fn) {
this.$util.request("mine.notice.details", {
id: this.noticeId
}).then(res => {
if (fn) fn()
if (res.code == 1) {
this.noticeInfo = res.data
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
}).catch(error => {
if (fn) fn()
console.error('获取通知详情 ', error)
})
},
},
}
</script>
<style lang="scss">
.container {
.container-main {
padding: 32rpx;
.main-box {
padding: 32rpx;
border-radius: 10rpx;
background: #FFF;
.box-info {
padding-bottom: 32rpx;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
.info-title {
color: #5A5B6E;
font-size: 32rpx;
font-weight: 600;
line-height: 40rpx;
}
.info-date {
margin-top: 8rpx;
color: #979797;
font-size: 24rpx;
line-height: 34rpx;
}
}
.box-content {
margin-top: 32rpx;
color: #5A5B6E;
font-size: 28rpx;
line-height: 48rpx;
}
}
}
}
</style>

156
pages/mine/notice/index.vue Normal file
View File

@@ -0,0 +1,156 @@
<!-- +----------------------------------------------------------------------
| 麦沃德科技赋能开发者助力商协会发展
+----------------------------------------------------------------------
| Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
+----------------------------------------------------------------------
| 沃德商协会系统并不是自由软件不加密并不代表开源未经许可不可自由转售和商用
+----------------------------------------------------------------------
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
+----------------------------------------------------------------------
| 消息通知 开发者: 麦沃德科技-半夏
+---------------------------------------------------------------------- -->
<template>
<view class="container">
<!-- 标题栏 -->
<title-bar title="消息通知"></title-bar>
<!-- 内容区 -->
<view class="container-main" v-if="loadEnd">
<view class="main-list" v-if="noticeList.length">
<view class="list-item" v-for="(item, index) in noticeList" :key="index" @click="toDetails(item.id)">
<view class="item-title">{{item.title}}</view>
<view class="item-date">{{item.createtime}}</view>
<view class="item-point" v-if="item.is_read != 1"></view>
</view>
</view>
<empty top="30%" title="暂无相关内容~" v-else></empty>
</view>
<!-- 底部导航 -->
<tab-bar></tab-bar>
</view>
</template>
<script>
export default {
data() {
return {
// 加载完成
loadEnd: false,
// 分类查询参数
page: 1,
limit: 20,
hasMore: false,
// 消息通知列表
noticeList: [],
}
},
onLoad() {
uni.showLoading({
title: "加载中"
})
this.getNoticeList(() => {
uni.hideLoading()
this.loadEnd = true
})
},
onShow() {
if (this.loadEnd) {
uni.pageScrollTo({
scrollTop: 0,
duration: 0
});
this.page = 1
this.getNoticeList()
}
},
onPullDownRefresh() {
this.page = 1
this.getNoticeList(() => {
uni.stopPullDownRefresh()
})
},
onReachBottom() {
if (this.hasMore) {
this.page++
this.getNoticeList()
}
},
methods: {
// 获取消息通知列表
getNoticeList(fn) {
if (fn) fn()
this.$util.request("mine.notice.list", {
page: this.page,
limit: this.limit,
}).then(res => {
if (fn) fn()
if (res.code == 1) {
let list = res.data.data
this.hasMore = this.page < res.data.total / this.limit ? true : false
this.noticeList = this.page == 1 ? list : [...this.noticeList, ...list];
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
}).catch(error => {
console.error('获取帮助列表 ', error)
})
},
// 跳转详情页面
toDetails(id) {
this.$util.toPage({
mode: 1,
path: "/pages/mine/notice/details?id=" + id
})
},
}
}
</script>
<style lang="scss">
.container {
.container-main {
padding: 32rpx;
.main-list {
.list-item {
position: relative;
border-radius: 16rpx;
background: #FFF;
padding: 32rpx;
margin-top: 32rpx;
&:first-child {
margin-top: 0;
}
.item-title {
color: #5A5B6E;
font-size: 28rpx;
font-weight: 600;
line-height: 40rpx;
}
.item-date {
margin-top: 8rpx;
color: #979797;
font-size: 24rpx;
line-height: 34rpx;
}
.item-point {
position: absolute;
top: 16rpx;
right: 16rpx;
width: 16rpx;
height: 16rpx;
background: #FF4646;
border-radius: 50%;
}
}
}
}
}
</style>