<template>
	<view class="container">
		<image class="cbg" src="../../static/common_bg.png"></image>
		<view class="wrap">
			<view v-if="list.length>0">
				<view class="wrap-item" @click="toUrl(item.id)" v-for="item in list">
					<view>{{item.username}}</view>
					<view>{{item.company_name}}</view>
					<view>{{item.company_position}}</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.getMyCourseTxl(options.id)
		},
		methods: {
			async getMyCourseTxl(id) {
				const res = await this.$u.api.courseUserList({
					// course_id: id,
					type: 1
				})
				this.list = res.list
			},
		}

	}
</script>

<style scoped lang="scss">
	.container {
		padding: 30rpx;
		width: 100%;
		height: 100vh;

		.cbg {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100vh;
		}

		.wrap {
			position: relative;

			.nodata {
				height: 100vh;
			}
			&-item {
				margin: 30rpx;
				padding: 30rpx;
				background-color: #fff;
			}
		}
	}
</style>