首次完整推送,

V:1.20240808.006
This commit is contained in:
fm453
2024-08-13 18:32:37 +08:00
parent 15be3e9373
commit c62d15b288
939 changed files with 111777 additions and 0 deletions

View File

@ -0,0 +1,83 @@
<template>
<view class="container">
<view v-if="!totalCount" class="content">
暂时没有消息通知
</view>
<uni-collapse v-else v-model="showIndexs">
<uni-collapse-item :name='"notice-"+index' :title='""+(index+1)+""+notice.title'
v-for="(notice,index) in notices" :data-nid="notice.id" :key="index" thumb="./static/logo.png">
<uni-list>
<uni-list-item :title="notice.content" :note="'更新于 : '+notice.updateTime"></uni-list-item>
</uni-list>
</uni-collapse-item>
</uni-collapse>
<view class="pagination">
<uni-pagination :show-icon="false" :total="totalCount" :pageSize='psize' v-model='page' title="分页栏"
@change="newPage" />
</view>
</view>
</template>
<script>
import utils from "@/utils/common.js";
import ctms from '@/apis/ctms/index.js';
export default {
data() {
return {
showIndexs: [],
notices: {},
totalCount: 0,
psize: 10,
page: 1
}
},
onLoad() {
this.checkNotice()
},
onPullDownRefresh() {
this.page = 1;
this.checkNotice();
setTimeout(() => {
uni.stopPullDownRefresh();
}, 3000);
},
methods: {
//刷新列表
checkNotice() {
var _that = this;
ctms.notice.list(this.page, this.psize).then(
function(res) {
if (res) {
_that.notices = res.notices;
for (var index in res.notices) {
if (res.notices[index]['is_show']) {
_that.showIndexs.push('notice-' + index);
}
}
_that.totalCount = res.total;
} else {
_that.orders = {}
_that.totalCount = 0;
}
}
);
},
//分页器动作
newPage(e) {
var page = e.current;
this.page = page;
this.checkNotice();
}
}
}
</script>
<style>
.content {
text-align: center;
height: 400upx;
margin-top: 200upx;
}
</style>