Compare commits

...

3 Commits

Author SHA1 Message Date
Lx
457b953046 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	pagesA/courseDetail/index.vue
#	pagesA/register/index.vue
2025-04-17 10:38:06 +08:00
Lx
d8970bab48 0417-2 2025-04-17 10:32:04 +08:00
Lx
6fb394ef18 0417-1 2025-04-17 10:01:13 +08:00
5 changed files with 340 additions and 297 deletions

View File

@ -1,16 +1,19 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title-color="#333" title="消息中心" :showClear="showClear" @clearNoRead="clearNoReadFun"></VNavigationBar>
<VNavigationBar background-color="#fff" title-color="#333" title="消息中心" :showClear="showClear"
@clearNoRead="clearNoReadFun"></VNavigationBar>
<view class="body">
<view class="messageList">
<scroll-view scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view v-for="(item, index) in messageList" :key="index" class="messageItem" @click="readNotice(item)">
<scroll-view scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view v-for="(item, index) in messageList" :key="index" class="messageItem"
@click="readNotice(item)">
<image class="messageIcon" src="@/static/imgs/message-icon1.png" mode="aspectFit"></image>
<view class="messageContent">
<view :class="{'messageTitle':item.readStatus,'noReadTitle':!item.readStatus}" >系统通知</view>
<view :class="{'messageTitle':item.readStatus,'noReadTitle':!item.readStatus}">系统通知</view>
<view class="messageContent_content">{{item.templateContent}}</view>
<view class="messageContent_content" style="text-align: right">{{formatTime(item.createTime)}}</view>
<view class="messageContent_content" style="text-align: right">
{{formatTime(item.createTime)}}</view>
</view>
</view>
<view style="text-align: center" v-if="messageList.length==0">
@ -20,7 +23,7 @@
</view>
</view>
<!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff" >
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
<text class="text popup-content-text">{{ nowReadItem.templateContent }}</text>
<button class="button popup-info" @click="dialogToggle"><text
@ -41,26 +44,26 @@
},
data() {
return {
type:"center",
type: "center",
messageList: [],
pageNo: 1,
pageSize: 15,
total: 0,
//
isTriggered:false,
isTriggered: false,
//
showClear:true,
nowReadItem:{},
showClear: true,
nowReadItem: {},
systemCode: 'jiaxiao',
};
},
onLoad(){
onLoad() {
},
onShow(){
onShow() {
this.getList()
},
methods:{
methods: {
/**
* 点击阅读消息
*/
@ -72,10 +75,12 @@
await request({
url: "/app-api/system/notify-message/update-read",
method: "PUT",
params:{ids:this.nowReadItem.id},
tenantIdFlag:false
params: {
ids: this.nowReadItem.id
},
tenantIdFlag: false
}).then((res) => {
if(res.code==200){
if (res.code == 200) {
this.onRefresherrefresh()
}
})
@ -83,31 +88,31 @@
/**
* 消息设置为已读
*/
dialogToggle(){
dialogToggle() {
this.$refs.popup.close()
},
/**
* 一键清空未读消息
*/
async clearNoReadFun(){
async clearNoReadFun() {
console.log("清空了")
await request({
url: "/app-api/system/notify-message/update-all-read",
method: "PUT",
tenantIdFlag:false
tenantIdFlag: false
}).then((res) => {
if(res.code==200){
if (res.code == 200) {
uni.showToast({
title: '操作成功',
icon: 'none'
})
setTimeout(()=>{
setTimeout(() => {
this.onRefresherrefresh()
},500)
}, 500)
}
})
},
formatTime(value){
formatTime(value) {
// Date
const date = new Date(value);
//
@ -137,7 +142,7 @@
/**
* 下拉刷新数据
*/
onRefresherrefresh(){
onRefresherrefresh() {
this.isTriggered = true
this.pageNo = 1
this.total = 0
@ -147,16 +152,16 @@
/**
* 分页查询
*/
async getList(){
async getList() {
await request({
url: "/app-api/system/notify-message/my-page",
method: "GET",
params:{
pageNo:this.pageNo,
pageSize:this.pageSize,
params: {
pageNo: this.pageNo,
pageSize: this.pageSize,
systemCode: this.systemCode,
},
tenantIdFlag:false
tenantIdFlag: false
}).then((res) => {
// concat n
if (this.pageNo != 1) {
@ -174,16 +179,18 @@
</script>
<style lang="less" scoped>
.container {
.container {
height: 100vh;
display: flex;
flex-direction: column;
.body {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.messageList {
flex: 1;
display: flex;
@ -198,6 +205,7 @@
}
}
.messageItem {
padding: 30rpx 0;
display: flex;
@ -209,17 +217,22 @@
width: 80rpx;
height: 80rpx;
}
.noReadTitle {
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.noReadTitle:after{
.noReadTitle:after {
content: "*";
color: red;
display: block; /* 或者其他的块级显示类型,比如 inline-block, table 等 */
position: absolute; /* 或者 absolute 或者 fixed取决于你的布局需求 */
z-index: 1; /* 确保它在元素的上方 */
display: block;
/* 或者其他的块级显示类型,比如 inline-block, table 等 */
position: absolute;
/* 或者 absolute 或者 fixed取决于你的布局需求 */
z-index: 1;
/* 确保它在元素的上方 */
right: 0;
}
@ -227,10 +240,12 @@
flex: 1;
width: 0;
}
.messageTitle {
font-size: 32rpx;
color: #333333;
}
.messageContent_content {
font-weight: 500;
font-size: 28rpx;
@ -242,6 +257,7 @@
margin-top: 20rpx;
}
}
.popup-content {
padding: 15px;
height: auto;
@ -249,6 +265,7 @@
width: 80%;
background-color: #fff;
}
.popup-content-text {
display: flex;
align-items: center;
@ -268,5 +285,5 @@
.info-text {
color: #909399;
}
}
}
</style>

View File

@ -55,6 +55,7 @@
getCoachId,
getInviteId,
getLocalUserInfo,
getStaffType,
getToken,
removeCoachId,
removeInviteId,
@ -150,6 +151,8 @@
if (res.data != null) {
this.qTenantId = res.data.tenantId
this.qCoachId = res.data.userId
console.log('tenantId', this.qTenantId)
console.log('coachId', this.qCoachId)
setTenantId(res.data.tenantId)
this.getList()
if (res.data.type == 'jl') {
@ -160,6 +163,8 @@
setCoachId(res.data.userId)
setStaffType('01')
}
console.log('getCoachId', getCoachId())
console.log('getStaffType', getStaffType())
}
})
},

View File

@ -3,7 +3,7 @@
{
"path": "newPages/newIndex/index",
"style": {
"enablePullDownRefresh": true,
"enablePullDownRefresh": false,
"navigationBarTitleText": "首页",
"navigationStyle": "custom"
}

View File

@ -5,12 +5,12 @@
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
</headers>
</view>
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view">
<view class="group_3 flex-col">
<image style="width: 100%; height: 100%;" :src="imagesUrl + '/' + courseDetails.photo"
<image style="width: 100%; height: 100%;" :src="imagesUrl + '/' + courseDetails.photo" />
v-if="courseDetails.photo" />
<u-empty mode="data" text='暂无图片' v-else>
</u-empty>
</view>
<view class="group_4 flex-col">
<view class="section_2 flex-row justify-between">
@ -44,6 +44,7 @@
</u-empty>
</view>
</view>
</scroll-view>
<view class="group_6 flex-row">
<view class="image-text_1 flex-col justify-between" @click="zxkf()">
<image class="label_2" referrerpolicy="no-referrer"
@ -78,6 +79,7 @@
driveSchoolPhone: [],
imagesUrl: config.imagesUrl,
userDetails: [],
scrollHeight: 0,
};
},
onLoad(options) {
@ -87,6 +89,10 @@
this.userDetails = getLocalUserInfo();
this.getServicePhone()
},
onReady() {
//
this.calculateScrollHeight();
},
methods: {
goBack() {
uni.navigateBack({
@ -123,6 +129,15 @@
})
},
calculateScrollHeight() {
//
const screenHeight = uni.getSystemInfoSync().windowHeight;
//
const topHeight = 166;
//
this.scrollHeight = screenHeight - topHeight;
},
goRegisterNow() {
console.log('token', getToken())
if (!getToken()) {

View File

@ -221,6 +221,7 @@
loading: false,
localStaffType: null,
localCoachId: null,
userDetails: [],
columns: [
[{
label: '全款',
@ -235,6 +236,7 @@
}
},
onLoad(option) {
console.log('option', option)
uni.showToast({
title: '请完善个人信息',
icon: 'none'
@ -243,11 +245,15 @@
this.hideTeacher = 1
}
this.jlId = uni.getStorageSync('jlId');
this.userDetails = getLocalUserInfo();
this.courseId = option.courseId,
this.userId = option.userId,
this.tenantId = option.tenantId
this.tenantId = option.tenantId,
this.userId = this.userDetails.id,
this.userinfo = getLocalUserInfo()
this.localStaffType = getStaffType()
this.localCoachId = getCoachId()
console.log('localCoachId', this.localCoachId);
console.log('userId', this.userId);
if (this.localStaffType === '02') {
this.localCoachId = getCoachId()
console.log('localCoachId', this.localCoachId);