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.

182 lines
3.9 KiB

1 year ago
<template>
<view class="container">
1 year ago
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
1 year ago
<view class="wrap">
1 year ago
<view v-if="teacher">
<view class="teacher">
<view>
<image style="width:97rpx;height:97rpx;margin-right:30rpx" :src="base.imgHost('txl-teacher.png')"></image>
</view>
<view>
<view class="teacher-name">
<view style="display: flex;align-items: center;">
<text>{{teacher.name}}</text>
<text class="courseName">班主任</text>
</view>
</view>
<view class="teacher-mobile">
<image style="width:22rpx;height:22rpx;margin-right:20rpx" :src="base.imgHost('txl-phone.png')"></image>
<view>{{teacher.mobile?teacher.mobile:''}}</view>
</view>
</view>
</view>
</view>
<!-- <view v-if="teacher">
<view class="teacher">
<view>
<image style="width:97rpx;height:97rpx;margin-right:30rpx" :src="base.imgHost('txl-student.png')"></image>
</view>
<view>
<view class="teacher-name">
<view style="display: flex;align-items: center;">
<text>{{teacher.name}}</text>
<text class="courseName">班主任</text>
</view>
</view>
<view class="teacher-company">苏州朗业网络科技有限公司</view>
<view class="teacher-mobile">
<image style="width:22rpx;height:22rpx;margin-right:20rpx" :src="base.imgHost('txl-phone.png')"></image>
<view>{{teacher.mobile?teacher.mobile:''}}</view>
</view>
</view>
</view>
</view> -->
1 year ago
<view v-if="list.length>0">
1 year ago
<nextIndexedXlist :dataList="list" :show-avatar="false">
</nextIndexedXlist>
1 year ago
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
1 year ago
</view>
1 year ago
1 year ago
</view>
</template>
<script>
1 year ago
import nextIndexedXlist from '@/components/next-indexed-xlist/components/next-indexed-xlist/next-indexed-xlist.vue';
1 year ago
export default {
1 year ago
components: {
nextIndexedXlist
},
1 year ago
data() {
return {
1 year ago
1 year ago
list: [],
1 year ago
teacher: null,
studentList:[]
1 year ago
}
},
onLoad(options) {
this.getMyCourseTxl(options.id)
1 year ago
},
methods: {
1 year ago
async getMyCourseTxl(id) {
const res = await this.$u.api.courseUserList({
course_id: id,
type: 2
1 year ago
})
1 year ago
// res.list.map(item=>{
// })
this.list = res.list
this.teacher = res.teacher
1 year ago
},
1 year ago
}
}
</script>
1 year ago
<style scoped lang="scss">
1 year ago
.container {
1 year ago
padding: 30rpx 60rpx;
1 year ago
width: 100%;
height: 100vh;
1 year ago
overflow: hidden;
1 year ago
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
1 year ago
position: relative;
height:100%;
overflow: scroll;
1 year ago
// padding-top: 100rpx;
1 year ago
.nodata {
1 year ago
height: calc(100vh - 160rpx);
}
1 year ago
.teacher {
width: 100%;
background-color: #FFFFFF;
box-sizing: border-box;
padding-left: 24rpx;
margin-bottom: 30rpx;
1 year ago
padding: 30rpx;
background-color: #fff;
1 year ago
border-radius: 20rpx;
display: flex;
align-items: center;
1 year ago
&-name {
font-size: 32rpx;
color: #333;
1 year ago
margin-bottom: 10rpx;
1 year ago
.courseName {
color: #b89155;
1 year ago
margin: 0 20rpx;
font-size: 24rpx;
border-radius: 0rpx 28rpx 28rpx 28rpx;
color: #fff;
padding:0rpx 15rpx;
background: #b89155;
1 year ago
}
}
1 year ago
&-mobile {
display: flex;
align-items: center;
color:#666666;
font-size: 28rpx;
margin-bottom: 10rpx;
}
&-company{
margin-bottom: 10rpx;
}
1 year ago
}
1 year ago
// &-item {
// margin: 30rpx 0;
// padding: 30rpx;
// background-color: #fff;
// border-radius: 20rpx;
// &>view {
// margin-bottom: 10rpx;
// }
// &-name {
// font-size: 32rpx;
// color: #333;
// .courseName {
// color: #b89155;
// margin: 0 10rpx;
// font-size: 28rpx;
// }
// }
// }
1 year ago
}
}
</style>