修改错题本的文件名

This commit is contained in:
田岩
2025-08-20 16:40:41 +08:00
parent 7a36fab884
commit 249fcf5dba
18 changed files with 585 additions and 216 deletions
+68 -27
View File
@@ -1,15 +1,15 @@
<template>
<view class="main_div max_page">
<view class="body-title">
<view class="back_div">
<view class="back_div" @click="common.navigateBack()">
<view class="back-icon"></view>
</view>
<view>消息</view>
<view class="delete_div">
<view class="delete_div" @click="oneClickReadMessage">
<image class="img" src="@/static/images/messageNotification/delete_icon.png" mode="aspectFit"></image>
</view>
</view>
<view class="input-view">
<!-- <view class="input-view">
<uv-input
shape="circle"
placeholderStyle="color:#999999;font-size:28rpx"
@@ -17,8 +17,10 @@
suffixIcon="search"
:customStyle="customStyle"
:suffixIconStyle="suffixIconStyle"
></uv-input>
</view>
>
</uv-input>
</view> -->
<scroll-view
ref="scrollRef"
:scroll-y="true"
@@ -71,7 +73,7 @@
</view>
</view>
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
<uv-load-more :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
</scroll-view>
<uni-popup ref="popup" type="bottom">
<view class="popup">
@@ -79,9 +81,9 @@
<view class="title">
{{ popup_info.title }}
</view>
<view class="text">消正息内容正文消息内容正文</view>
<view class="text">{{ popup_info.text }}</view>
<view class="button_div" @click.stop="readMessage">
<uv-button class="button">我知道了</uv-button>
<uv-button :loading="readLoading" class="button">我知道了</uv-button>
</view>
</view>
</view>
@@ -92,7 +94,8 @@
<script setup>
import { ref, reactive, nextTick, onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { queryTraPersonalMessageNoticePaging, readNotice } from '@/api/messageNotification.js';
import { queryTraPersonalMessageNoticePaging, readNotice, oneTimeRead } from '@/api/messageNotification.js';
import common from '../../common/common';
const customStyle = {
backgroundColor: '#ffffff',
@@ -114,12 +117,14 @@
const data_list = reactive([]);
const triggered = ref(false);
const _freshing = ref(false);
const readLoading = ref(false);
const offset = ref(0);
const scrollRef = ref(null);
const popup_info = reactive({
id: '',
title: '',
text: ''
text: '',
isRead: ''
});
const popup = ref(null);
@@ -140,7 +145,7 @@
_freshing.value = false;
}, 1000);
};
const getData = (from = '') => {
if (from == 'first') {
if (total.value !== -1) {
@@ -155,7 +160,6 @@
status.value = 'loading';
page.value++;
}
console.log(status.value, '阿斯顿撒');
queryTraPersonalMessageNoticePaging({
page: page.value,
limit: limit
@@ -174,21 +178,55 @@
};
const readMessage = () => {
readNotice({ noticeId: popup_info.id }).then((res) => {
if (popup_info.isRead === '02') {
popup.value.close();
data_list.forEach((item) => {
if (item.noticeId === popup_info.id) {
item.isRead = res.body.isRead;
return;
}
return;
}
readLoading.value = true;
readNotice({ noticeId: popup_info.id })
.then((res) => {
popup.value.close();
readLoading.value = false;
data_list.forEach((item) => {
if (item.noticeId === popup_info.id) {
item.isRead = res.body.isRead;
return;
}
});
})
.finally(() => {
readLoading.value = false;
});
});
};
const oneClickReadMessage = () => {
const state = data_list.every((res) => res.isRead === '02');
if (state) {
common.msg('暂无未读消息');
return;
}
common.loading();
oneTimeRead()
.then((res) => {
data_list.forEach((item) => {
item.isRead = '02';
});
common.hideLoading();
setTimeout(() => {
common.msg('一键读取成功');
}, 10);
})
.catch(() => {
common.hideLoading();
});
};
// 读取消息
const readMessageOpen = (item) => {
console.log('item', item);
popup_info.id = item.noticeId;
popup_info.title = item.noticeTitle;
popup_info.text = item.noticeContent;
popup_info.isRead = item.isRead;
popup.value.open();
};
const scrolltolower = (item) => {
@@ -254,13 +292,14 @@
}
.scroll-Y {
height: calc(100vh - 70rpx - var(--status-bar-height) - 78rpx - 40rpx);
// 70rpx 改成100 78没了
height: calc(100vh - 100rpx - var(--status-bar-height) - 40rpx);
position: relative;
overflow: hidden;
border-radius: 20rpx 20rpx 0 0;
position: relative;
background-color: #fff;
box-shadow: 0 0 6rpx #b3d6ff;
box-shadow: 0 -12rpx 12rpx #c3dbff;
.item {
height: 154rpx;
@@ -357,22 +396,24 @@
.body-title {
width: 100%;
height: 70rpx;
height: 100rpx;
// 80改成100
font-size: 33rpx;
padding-top: 10rpx;
font-weight: 500;
color: #000;
font-weight: 600;
position: relative;
text-align: center;
.delete_div {
position: absolute;
right: 20rpx;
top: 17rpx;
width: 50rpx;
height: 50rpx;
top: 7rpx;
width: 70rpx;
height: 70rpx;
.img {
margin-top: 10rpx;
width: 34rpx;
height: 34rpx;
}
@@ -381,8 +422,8 @@
.back_div {
position: absolute;
left: 26rpx;
height: 34rpx;
top: 17rpx;
padding: 0 14rpx 14rpx 0;
.back-icon {
position: relative;