<template>
	<view>
		<view class="cellWrap">
			<view class="cellItem" v-for="item in typeList" :key="item" @click="intoPage(item)">
				 <view class="cellText">{{item}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				query:{
					page: 1,
					page_size:999,
					type:'单选题'
				},
				typeList: ['单选','多选','判断']
			}
		},
		methods: {
			intoPage(item){
				this.query.type=item;
				this.$u.api.questionList(this.query).then(res=>{
					let currentExam={};
					currentExam.questions_ = res.data.results;
					uni.setStorageSync('currentExam', currentExam);
					uni.navigateTo({
						url:"/pages/exam/testDetail"
					})
				})
				
				
				
			}
		}
	}
</script>

<style>
	.cellWrap{
		display: flex;
		flex-direction: column;
		margin: auto;
		margin-top: 30upx;
		margin-bottom: 30upx;
		justify-content: space-evenly;
	
	}
.cellItem{
	text-align: center;
	margin-top: 50upx;
	width: 60%;
	margin-left: 20%;
}

.cellText{
	height: 60upx;
	line-height: 60upx;
	text-align: center;
	color: #339900;
	border: 1px solid #339900;
	border-radius: 15rpx;
}
 .cellItem:nth-of-type(2) .cellText{
	color: #efb336;
	border: 1px solid #efb336;
}
 .cellItem:nth-of-type(3) .cellText{
	color: #1296db;
	border: 1px solid #1296db;
}
</style>
