|
|
|
@ -1,24 +1,27 @@ |
|
|
|
<!--作业详情--> |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view class="main_box"> |
|
|
|
<!-- 作业展示--> |
|
|
|
<view class="top-style" v-if="infoData.student_file"> |
|
|
|
<video v-if="infoData.student_file_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.student_file)"></video> |
|
|
|
<image v-else style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.student_file)" mode="aspectFit"></image> |
|
|
|
<view class="top-style" v-if="infoData.content_text"> |
|
|
|
<video v-if="infoData.content_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.content_text)"></video> |
|
|
|
<image v-else-if="infoData.content_type == 1" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.content_text)" mode="aspectFit"></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 简练信息+作业描述--> |
|
|
|
<view class="below-style"> |
|
|
|
<view class="head-img"> |
|
|
|
<!--教练头像--> |
|
|
|
<fui-avatar width="80" :src="$util.img(infoData.coach_pic)"></fui-avatar> |
|
|
|
<view class="head-text">{{infoData .coach_name}}</view> |
|
|
|
<!--学生头像--> |
|
|
|
<fui-avatar width="80" :src="infoData.student.customerResources.member.headimg ? infoData.student.customerResources.member.headimg : $util.img('/uniapp_src/static/images/common/yong_hu.png')"></fui-avatar> |
|
|
|
<view class="head-text">{{infoData .student.name}}</view> |
|
|
|
</view> |
|
|
|
<view class="multi-line-ellipsis" v-html="infoData.content_text"></view> |
|
|
|
<view class="multi-line-ellipsis"> |
|
|
|
状态:{{ infoData.status == 1 ? '待批改' : infoData.status == 2 ? '未提交' : infoData.status == 3 ? '已提交' :''}} </view> |
|
|
|
<view class="multi-line-ellipsis" v-html="infoData.description"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import apiRoute from '@/api/apiRoute.js'; |
|
|
|
import memberApi from '@/api/member.js'; |
|
|
|
|
|
|
|
|
|
|
|
@ -34,7 +37,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
this.filteredData.id = options.id |
|
|
|
this.filteredData.id = options.id//作业id |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
this.init()//初始化数据 |
|
|
|
@ -48,7 +51,7 @@ export default { |
|
|
|
//获取作业详情 |
|
|
|
async getAssignmentsInfo() { |
|
|
|
let params = {...this.filteredData} |
|
|
|
let res = await memberApi.assignmentsInfo(params) |
|
|
|
let res = await apiRoute.xy_assignmentsInfo(params) |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
@ -64,11 +67,16 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
.main_box{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
background: #292929; |
|
|
|
padding-top: 45rpx; |
|
|
|
} |
|
|
|
.top-style{ |
|
|
|
width: 92%; |
|
|
|
height: 700rpx; |
|
|
|
margin: auto; |
|
|
|
margin-top: 45rpx; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
@ -80,19 +88,22 @@ export default { |
|
|
|
.below-style{ |
|
|
|
width: 92%; |
|
|
|
margin: auto; |
|
|
|
.head-img { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
padding: 10rpx 20rpx; |
|
|
|
} |
|
|
|
.head-text { |
|
|
|
color: #fff; |
|
|
|
font-size: 35rpx; |
|
|
|
padding-left: 20rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.head-img { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
padding: 10rpx 20rpx; |
|
|
|
} |
|
|
|
.head-text { |
|
|
|
color: #333333; |
|
|
|
font-size: 35rpx; |
|
|
|
padding-left: 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.multi-line-ellipsis { |
|
|
|
color: #333333; |
|
|
|
margin-top: 20rpx; |
|
|
|
color: #fff; |
|
|
|
font-size: 29rpx; |
|
|
|
padding: 5rpx 10rpx; |
|
|
|
// display: -webkit-box; |
|
|
|
|