This commit is contained in:
Lx 2025-04-17 10:01:13 +08:00
parent f4e040e0a8
commit 6fb394ef18
4 changed files with 434 additions and 398 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="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">
@ -72,7 +75,9 @@
await request({
url: "/app-api/system/notify-message/update-read",
method: "PUT",
params:{ids:this.nowReadItem.id},
params: {
ids: this.nowReadItem.id
},
tenantIdFlag: false
}).then((res) => {
if (res.code == 200) {
@ -178,12 +183,14 @@
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 {
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;

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,11 +5,9 @@
<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" />
</view>
<view class="group_4 flex-col">
<view class="section_2 flex-row justify-between">
@ -39,20 +37,15 @@
<u-parse :content="courseDetails.remark"></u-parse>
</view>
<view class="u-content" v-else>
<u-empty
mode="list"
text="该课程没有简介..."
>
<u-empty mode="list" text="该课程没有简介...">
</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"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG283b4603035848d5dcc7209d10653327.png"
/>
<image class="label_2" referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG283b4603035848d5dcc7209d10653327.png" />
<text class="text-group_1">咨询客服</text>
</view>
<view class="text-wrapper_4 flex-col" @click="goRegisterNow()">
@ -64,11 +57,17 @@
<script>
import request from "@/utils/request";
import config from "@/config.js"
import {getLocalUserInfo, getUserInfo, getToken} from "@/utils/auth";
import {
getLocalUserInfo,
getUserInfo,
getToken
} from "@/utils/auth";
import headers from "@/components/header/headers.vue";
export default {
components: {headers},
components: {
headers
},
data() {
return {
courseId: undefined,
@ -77,6 +76,7 @@ export default {
driveSchoolPhone: [],
imagesUrl: config.imagesUrl,
userDetails: [],
scrollHeight: 0,
};
},
onLoad(options) {
@ -86,6 +86,10 @@ export default {
this.userDetails = getLocalUserInfo();
this.getServicePhone()
},
onReady() {
//
this.calculateScrollHeight();
},
methods: {
goBack() {
uni.navigateBack({
@ -122,6 +126,15 @@ export default {
})
},
calculateScrollHeight() {
//
const screenHeight = uni.getSystemInfoSync().windowHeight;
//
const topHeight = 166;
//
this.scrollHeight = screenHeight - topHeight;
},
goRegisterNow() {
console.log('token', getToken())
if (!getToken()) {
@ -150,6 +163,7 @@ export default {
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
.u-content {
margin-top: 20rpx;
padding: 10rpx;