<template>
	<view style="padding: 30rpx;">
		<view v-for="(item, index) in list" :key="index"  style="margin-bottom: 30rpx;">
			<navigator :url="'/pages2/bank/question_detail?id='+item.goodsId">
			<!-- <navigator url="/pages2/bank/detail"> -->
				<view class="class_item">
					<image class="img" :src="$method.splitImgHost(item.coverUrl, true)"></image>
					<view style="color: #333333;font-weight: bold;font-size: 32rpx;">
						{{item.goodsName}}
					</view>
					<view class=".content_box">
						<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
						学习有效期：<text class="content"> {{$method.timestampToTime(item.studyStartTime)}} - {{$method.timestampToTime(item.studyEndTime)}} </text>
					</view>
				</view>
			<!-- </navigator> -->
				<view class="bottomBox">
					<view class="box_progress">
						<view style="width: 60%;">
							<u-line-progress active-color="#007AFF" :percent="70"></u-line-progress>
						</view>
						<view>
							<!-- <navigator :url="'/pages2/bank/question_detail?id='+item.goodsId"> -->
								<view class="btn">进入刷题</view>
							<!-- </navigator> -->
						</view>
					</view>
				</view>
			</navigator>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
				
			}
		},
		onLoad(option) {
			this.listGoodsUserQuestion();
		},
		onShow(){
			
		},
		methods: {
			listGoodsUserQuestion() {
				this.$api.listGoodsUserQuestion({
					
				}).then(res => {
					this.list = res.data.rows;
				})
			},
			studyIn(){
				this.$navTo.togo('/pages2/verify/input');
			},
			appointment(){
				this.$navTo.togo('/pages2/appointment/index');
			}
		},
		
	}
</script>
<style >
	page {
			background: #EAEEF1;
		}
</style>
<style lang="scss" scope>
	
	.box_progress{
		display: flex;
		justify-content:space-between;
		align-items: center;
		margin-top: 20rpx;
		
		.btn {
			width: 165rpx;
			height: 48rpx;
			background: #007AFF;
			border-radius: 16rpx;
			line-height: 48rpx;
			text-align: center;
			color:#fff;
			font-size: 30rpx;
		}
	}
	.bottomBox{
		background: #FFFFFF;
		width: 94%;
		border-bottom-left-radius: 24rpx;
		border-bottom-right-radius: 24rpx;
		margin: 0 auto;
		padding: 20rpx;
	}
	.content_box{
		display: flex;
		align-items: center;
		color: #999999;
		margin-top: 8rpx;
	}
	.content{
		color: #000000;
		margin: 0 8rpx;
	}
	.wk_icon{
		width: 24rpx;
		height: 24rpx;
		margin-right: 8rpx;
	}

	.class_item{
		width: 100%;
		height: 514rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
		border-radius: 24rpx;
		padding: 20rpx;
		z-index: 999;
		position: relative;
		
		.img {
			width:100%;
			border-radius: 24rpx;
			height: 316rpx;
		}
	}
</style>
