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.

113 lines
2.4 KiB

<template>
<view class="container">
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<view class="wrap">
<view v-if="list.length>0">
<nextIndexedXlist :dataList="list" :show-avatar="false">
</nextIndexedXlist>
<!-- <u-index-list :scrollTop="scrollTop" @select="selectIndex">
<view v-for="(item, index) in indexList" :key="index">
<u-index-anchor :custom-style="{background:'transparent'}" :use-slot="true">
<text class="anchor-text">{{item}}</text>
</u-index-anchor>
<block v-for="item1 in list">
<view class="wrap-item" v-if="item===item1.letter">
<view class="wrap-item-name">
<text>{{item1.username}}</text>
<text class="courseName"
v-if="item1.course_signs.length>0">【{{item1.course_signs[0]['course'].name}}】</text>
</view>
<view>{{item1.company_name}}</view>
<view>{{item1.company_position}}</view>
</view>
</block>
</view>
</u-index-list> -->
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
</view>
</view>
</template>
<script>
import nextIndexedXlist from '@/components/next-indexed-xlist/components/next-indexed-xlist/next-indexed-xlist.vue';
export default {
components: {
nextIndexedXlist
},
data() {
return {
list: [],
}
},
onLoad(options) {
this.getMyCourseTxl(options.id)
},
methods: {
async getMyCourseTxl(id) {
const res = await this.$u.api.courseUserList({
course_id: id,
type: 2
})
this.list = res.list
},
}
}
</script>
<style scoped lang="scss">
::v-deep .next-list{
height:calc(100vh - 60rpx)
}
.container {
padding: 30rpx 60rpx;
width: 100%;
height: 100vh;
overflow: scroll;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
position: relative;
// padding-top: 100rpx;
.nodata {
height: calc(100vh - 160rpx);
}
&-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;
}
}
}
}
}
</style>