智慧教务系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

174 lines
3.3 KiB

<!--消息详情页面-->
<template>
<view class="main_box">
<!-- 消息基本信息 -->
<view class="message_info_card" v-if="messageInfo">
<view class="message_header">
<view class="message_title">{{ messageInfo.title }}</view>
<view class="message_time">{{ messageInfo.created_at }}</view>
</view>
<view class="message_details">
<view class="detail_item">
<view class="detail_label">发送者</view>
<view class="detail_value">{{ messageInfo.sender }}</view>
</view>
</view>
<view class="message_content">
<view class="content_title">消息内容</view>
<view class="content_text">{{ messageInfo.content }}</view>
</view>
</view>
<!-- 空状态 -->
<view class="empty_state" v-if="!loading && !messageInfo">
<image src="/static/icon-img/empty.png" class="empty_icon"></image>
<view class="empty_text">暂无消息信息</view>
</view>
<!-- 加载状态 -->
<view class="loading_state" v-if="loading">
<view class="loading_text">加载中...</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
messageInfo: null,
loading: false,
messageId: null,
childId: null
}
},
onLoad(options) {
this.messageId = options.messageId
this.childId = options.childId
this.loadMessageInfo()
},
methods: {
async loadMessageInfo() {
// 模拟消息详情数据
this.messageInfo = {
title: '课程提醒',
sender: '王教练',
created_at: '2024-01-15 09:30:00',
content: '提醒您的孩子明天有篮球课,请准时参加。上课时间:10:00-11:30,地点:篮球馆A。'
}
}
}
}
</script>
<style lang="less" scoped>
.main_box {
background: #f8f9fa;
min-height: 100vh;
padding: 20rpx;
}
.message_info_card {
background: #fff;
border-radius: 16rpx;
padding: 32rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
.message_header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
padding-bottom: 24rpx;
border-bottom: 1px solid #f0f0f0;
.message_title {
font-size: 36rpx;
font-weight: 600;
color: #333;
}
.message_time {
font-size: 24rpx;
color: #999;
}
}
.message_details {
margin-bottom: 32rpx;
.detail_item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
border-bottom: 1px solid #f8f9fa;
.detail_label {
font-size: 28rpx;
color: #666;
min-width: 160rpx;
}
.detail_value {
font-size: 28rpx;
color: #333;
flex: 1;
text-align: right;
}
}
}
.message_content {
.content_title {
font-size: 28rpx;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
}
.content_text {
font-size: 26rpx;
color: #666;
line-height: 1.6;
padding: 16rpx;
background: #f8f9fa;
border-radius: 8rpx;
}
}
}
.empty_state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
.empty_icon {
width: 160rpx;
height: 160rpx;
margin-bottom: 32rpx;
opacity: 0.3;
}
.empty_text {
font-size: 28rpx;
color: #999;
}
}
.loading_state {
display: flex;
justify-content: center;
align-items: center;
padding: 60rpx 0;
.loading_text {
font-size: 28rpx;
color: #666;
}
}
</style>