This commit is contained in:
王创世 2025-06-19 09:45:03 +08:00
parent e3c10cd38b
commit 0339d44d16

View File

@ -1,7 +1,7 @@
<template>
<view class="box flex flex-column">
<view class="nav">
<u-navbar :is-back="true" :autoBack="true" leftIconColor="#323232" bgColor="#FFFFFF">
<u-navbar :is-back="true" :autoBack="true" leftIconColor="#323232" bgColor="#FFFFFF">
<!-- <view
class="u-nav-slot"
slot="left"
@ -11,21 +11,15 @@
size="22"
></u-icon>
</view> -->
<view
class="nav_txt"
slot="center"
@click="one"
>
<view class="nav_txt" slot="center" @click="one">
<span style="padding-right: 20rpx;font-size: 34rpx;font-weight: bold;">系统消息</span>
<u-icon
size="19"
name="/static/clearicon.png"
></u-icon>
<u-icon size="19" name="/static/clearicon.png"></u-icon>
</view>
</u-navbar>
</view>
<view style="margin-top: 180rpx;" v-if="list.length > 0">
<view class="center flex flex-column flex-start" v-for="detail,index in list" :key="index" @click="only(detail.id,detail.type)">
<view class="center flex flex-column flex-start" v-for="detail,index in list" :key="index"
@click="only(detail.id,detail.type)">
<span class="title">
<span class="jiao" v-if="detail.type == 1">
<u-badge :isDot="true" type="error"></u-badge>
@ -36,13 +30,13 @@
<!-- <u-parse :content="detail.desc" :selectable="true"></u-parse> -->
<rich-text :nodes="detail.desc" selectable user-select></rich-text>
</span>
<span class="span" style="margin-top: 20rpx; color: #999999 ;">{{detail.createtime_text}}</span>
<span class="span" style="margin-top: 20rpx; color: #999999 ;">{{detail.createtime_text}}</span>
</view>
</view>
<!-- <u-loadmore :status="loadStatus" nomoreText="已经到底啦~"/> -->
<view class="flex flex-column flex-start align-items" v-else style="margin-top: 600rpx;">
<image src="/static/message/message.png" mode="" style="width: 256rpx;height: 240rpx;">
</image>
<u-loadmore :status="loadStatus" nomoreText="已经到底啦~" v-if="list.length > 0" />
<view class="flex flex-column flex-start align-items" v-if="list.length == 0" style="margin-top: 600rpx;">
<image src="/static/message/message.png" mode="" style="width: 256rpx;height: 240rpx;">
</image>
<view>暂无消息~</view>
</view>
</view>
@ -54,9 +48,9 @@
return {
page: 1,
limit: 10,
list:[],
list: [],
loadStatus: 'loading',
count:0
count: 0
};
},
onShow() {
@ -75,8 +69,8 @@
},
methods: {
//
only(id,type){
only(id, type) {
uni.$u.http.get('/api/school/message/detail', {
params: {
id: id,
@ -97,13 +91,13 @@
});
}
}).catch(error => {});
},
//
detail(id){
detail(id) {
uni.navigateTo({
url:"/packageA/my/stationDetail?id=" + id
url: "/packageA/my/stationDetail?id=" + id
})
},
getDetail() {
@ -117,7 +111,7 @@
}).then(res => {
if (res.code == 1) {
this.count = res.data.count;
this.list = [...res.data.list , ...this.list ]
this.list = [...res.data.list, ...this.list]
this.loadStatus = this.list.length >= res.data.count ? 'nomore' : 'loading';
} else {
uni.showToast({
@ -145,8 +139,8 @@
icon: 'none',
duration: 2000
});
this.list=[];
this.page=1;
this.list = [];
this.page = 1;
this.getDetail();
} else {
uni.showToast({
@ -173,13 +167,14 @@
width: 750rpx;
min-height: 100vh;
margin: 0 auto;
.nav_txt{
.nav_txt {
display: flex;
justify-content: center;
align-items: center;
}
.u-nav-slot{
.u-nav-slot {
width: 64rpx;
height: 64rpx;
border-radius: 32rpx 32rpx 32rpx 32rpx;
@ -236,6 +231,7 @@
padding: 30rpx;
box-sizing: border-box;
position: relative;
.span {
font-family: PingFang SC, PingFang SC;
font-weight: 500;
@ -248,13 +244,19 @@
font-family: PingFang SC, PingFang SC;
font-weight: 800;
font-size: 34rpx;
color: #202020 ;
color: #202020;
display: flex;
align-items: center;
justify-content: start;
}
.jiao {
margin-right: 20rpx;
}
}
</style>
<style>
::v-deep .u-loadmore{
display: block!important;
}
</style>