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.

100 lines
2.1 KiB

<template>
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view v-if="list.length>0">
<view class="item" v-for="item in list">
<view class="item-date">{{item.date}}</view>
<view class="item-period">{{item.period}}</view>
<view class="item-img">
<image src="../../static/mycourse-c1.png" style="width:22rpx;height:22rpx"></image>
<text>{{item.theme}}</text>
</view>
<view class="item-img">
<image src="../../static/mycourse-c2.png" style="width:20rpx;height:23rpx"></image>
<text>{{item.teacher?item.teacher.name:''}}</text>
</view>
<view class="item-img">
<image src="../../static/mycourse-c3.png" style="width:19rpx;height:27rpx"></image>
<text>{{item.address}}</text>
</view>
</view>
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
list: []
}
},
onLoad(options) {
this.getMyCourseContents(options.id)
},
methods: {
async getMyCourseContents(id) {
const res = await this.$u.api.courseContent({
course_id: id,
})
this.list = res.list
},
}
}
</script>
<style scoped lang="scss">
.container {
padding: 30rpx;
width: 100%;
height: 100vh;
overflow: scroll;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
position: relative;
.item{
background-color: #fff;
padding:30rpx;
margin-bottom: 20rpx;
border-radius: 20rpx;
&-date{
font-size: 32rpx;
color:#b08c6c;
margin-bottom:30rpx
}
&-period{
color:#333333;
margin-left:20rpx;
margin-bottom:20rpx
}
&-img{
color:#666666;
display: flex;
align-items: center;
margin-left:20rpx;
margin-bottom:20rpx;
image{
margin-right:10rpx;
}
}
}
.nodata {
height: 100vh;
}
}
}
</style>