109 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			109 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Python
		
	
	
	
<template>
 | 
						||
	<view class='wrap'>
 | 
						||
		<view class="subTitle">
 | 
						||
			考试信息
 | 
						||
		</view>
 | 
						||
		<view class="examContent">
 | 
						||
			<view>考试名称:<text>{{currentExam.name}}</text> </view>
 | 
						||
			<view>考试总分:<text>{{currentExam.paper_.total_score}}</text>分</view>
 | 
						||
			<view v-if="currentExam.limit>0">考试时长:<text>{{currentExam.limit}}</text>分钟</view>
 | 
						||
			<view v-else>考试时长:<text>不限时长</text></view>
 | 
						||
			<view>题目分布:单选<text>{{currentExam.paper_.danxuan_count}}</text>道;多选<text>{{currentExam.paper_.duoxuan_count}}</text>道;判断<text>{{currentExam.paper_.panduan_count}}</text>道</view>
 | 
						||
			<view>判分规则:单选{{currentExam.paper_.danxuan_score}}分,多选{{currentExam.paper_.duoxuan_score}}分,多选{{currentExam.paper_.panduan_score}}分,错选少选均不得分</view>
 | 
						||
		</view>
 | 
						||
		<!-- <view class="subTitle">答题须知</view> -->
 | 
						||
		<view class="tipsArea">
 | 
						||
			<ul>
 | 
						||
				<li class="tipsTitle">答题须知。</li>
 | 
						||
				<li>1.进入答题后请不要后退或返回。</li>
 | 
						||
				<li>2.可点击上一题/下一题切换。</li>
 | 
						||
				<li>3.可点击答题卡复查</li>
 | 
						||
				<li>4.请合理安排时间答题,可提前交卷</li>
 | 
						||
			</ul>
 | 
						||
		</view>
 | 
						||
		<u-button type="primary" @click="start()" class="start">开始答题</u-button>
 | 
						||
	</view>
 | 
						||
</template>
 | 
						||
 | 
						||
<script>
 | 
						||
	export default {
 | 
						||
		data() {
 | 
						||
			return {
 | 
						||
				currentExam:{}
 | 
						||
			}
 | 
						||
		},
 | 
						||
		onLoad() {
 | 
						||
			this.currentExam = uni.getStorageSync('currentExam')
 | 
						||
		},
 | 
						||
		methods: {
 | 
						||
			start(){
 | 
						||
				this.$u.api.startExam(this.currentExam.id).then(res=>{
 | 
						||
					let currentExam =uni.getStorageSync('currentExam');
 | 
						||
					currentExam.examrecord = res.data.examrecord;
 | 
						||
					currentExam.questions_ = res.data.questions_;
 | 
						||
					uni.setStorageSync('currentExam',currentExam)
 | 
						||
					uni.reLaunch({
 | 
						||
						url:'/pages/exam/main'
 | 
						||
					})
 | 
						||
				})
 | 
						||
				
 | 
						||
			}
 | 
						||
		}
 | 
						||
	}
 | 
						||
</script>
 | 
						||
 | 
						||
<style lang="scss" scoped>
 | 
						||
.wrap{
 | 
						||
	padding: 24rpx;
 | 
						||
	font-size: 30rpx;
 | 
						||
}
 | 
						||
.subTitle {
 | 
						||
	font-size: $u-font-size-title;
 | 
						||
	font-weight: bold;
 | 
						||
	// color: $theme-color;
 | 
						||
	text-align: center;
 | 
						||
	margin: 40rpx auto 20rpx auto;
 | 
						||
}
 | 
						||
.examContent {
 | 
						||
	line-height: 50rpx;
 | 
						||
	margin-left: 80rpx;
 | 
						||
	view{
 | 
						||
		margin-bottom: 6rpx;
 | 
						||
	}
 | 
						||
	text {
 | 
						||
		font-weight: bold;
 | 
						||
		color:$theme-color;;
 | 
						||
	}
 | 
						||
}
 | 
						||
.tipsArea {
 | 
						||
	padding: 20rpx 40rpx;
 | 
						||
	margin-left: 0rpx;
 | 
						||
	margin-bottom: 30rpx;
 | 
						||
	border: 1px solid #2581e4;
 | 
						||
	border-radius: 20rpx;
 | 
						||
	font-size: 28rpx;
 | 
						||
	margin-top: 50rpx;
 | 
						||
	.tipsTitle{
 | 
						||
		font-weight: bold;
 | 
						||
		color: #2581e4;
 | 
						||
	}
 | 
						||
}
 | 
						||
 | 
						||
ul {
 | 
						||
	margin: 0 30rpx;
 | 
						||
	line-height: 50rpx;
 | 
						||
}
 | 
						||
.start{
 | 
						||
	width: 50%;
 | 
						||
	font-size: 30rpx;
 | 
						||
	height: 110rpx;
 | 
						||
	line-height: 105rpx;
 | 
						||
	color: #ffffff;
 | 
						||
	border-color: #2581e4;
 | 
						||
	background-color: #2581e4;
 | 
						||
	border-radius: 10rpx;
 | 
						||
	text-align: center;
 | 
						||
	margin: auto;
 | 
						||
}
 | 
						||
</style>
 |