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.
181 lines
3.6 KiB
181 lines
3.6 KiB
<!--教学资料详情页面-->
|
|
<template>
|
|
<view class="main_box">
|
|
<!-- 资料基本信息 -->
|
|
<view class="material_info_card" v-if="materialInfo">
|
|
<view class="material_header">
|
|
<view class="material_title">{{ materialInfo.title }}</view>
|
|
<view class="material_type">{{ materialInfo.type }}</view>
|
|
</view>
|
|
|
|
<view class="material_details">
|
|
<view class="detail_item">
|
|
<view class="detail_label">发布时间</view>
|
|
<view class="detail_value">{{ materialInfo.created_at }}</view>
|
|
</view>
|
|
<view class="detail_item">
|
|
<view class="detail_label">资料类型</view>
|
|
<view class="detail_value">{{ materialInfo.type }}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="material_content">
|
|
<view class="content_title">资料内容</view>
|
|
<view class="content_text">{{ materialInfo.content }}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 空状态 -->
|
|
<view class="empty_state" v-if="!loading && !materialInfo">
|
|
<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 {
|
|
materialInfo: null,
|
|
loading: false,
|
|
materialId: null,
|
|
childId: null
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
this.materialId = options.materialId
|
|
this.childId = options.childId
|
|
this.loadMaterialInfo()
|
|
},
|
|
methods: {
|
|
async loadMaterialInfo() {
|
|
// 模拟教学资料详情数据
|
|
this.materialInfo = {
|
|
title: '篮球基础训练视频',
|
|
type: '视频资料',
|
|
created_at: '2024-01-15 14:30:00',
|
|
content: '这是一套专门为少儿设计的篮球基础训练视频,包含运球、投篮、传球等基本技能的教学内容。'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.main_box {
|
|
background: #f8f9fa;
|
|
min-height: 100vh;
|
|
padding: 20rpx;
|
|
}
|
|
|
|
.material_info_card {
|
|
background: #fff;
|
|
border-radius: 16rpx;
|
|
padding: 32rpx;
|
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
|
|
|
|
.material_header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 32rpx;
|
|
padding-bottom: 24rpx;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
.material_title {
|
|
font-size: 36rpx;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.material_type {
|
|
font-size: 24rpx;
|
|
padding: 8rpx 16rpx;
|
|
border-radius: 12rpx;
|
|
background: rgba(41, 211, 180, 0.1);
|
|
color: #29d3b4;
|
|
}
|
|
}
|
|
|
|
.material_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;
|
|
}
|
|
}
|
|
}
|
|
|
|
.material_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>
|