98 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			98 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Python
		
	
	
	
<template>
 | 
						||
	<view>
 | 
						||
		<image class="examImage" :src="imageSrc" mode="aspectFit"></image>
 | 
						||
		<view class="finishText">
 | 
						||
			恭喜您完成考试!
 | 
						||
		</view>
 | 
						||
		<view class="finishText">
 | 
						||
			<view><text>{{currentExam.name}}</text></view>
 | 
						||
			<!-- 练习类型{{paperRecord.paperName}} -->
 | 
						||
			<view>总分:<text>{{currentExam.total_score}}</text>分</view>
 | 
						||
			<!-- <view>答对:<text>{{paperRecord.rightQueNum}}</text>题</view> -->
 | 
						||
			<view>得分:<text>{{currentExam.score}}</text> 分 </view>
 | 
						||
		</view>
 | 
						||
		<view class="btnArea">
 | 
						||
			<u-button class="btnClass" type="primary" :ripple="true" shape="circle" @click="goDetail">查看答卷</u-button>
 | 
						||
			<u-button class="btnClass" :ripple="true" shape="circle" @click="backToHome">返回首页</u-button>
 | 
						||
		</view>
 | 
						||
	</view>
 | 
						||
</template>
 | 
						||
 | 
						||
<script>
 | 
						||
	export default {
 | 
						||
		data() {
 | 
						||
			return {
 | 
						||
				imageSrc: '/static/exam/result.png',
 | 
						||
				currentExam:{}
 | 
						||
			}
 | 
						||
		},
 | 
						||
		methods: {
 | 
						||
			goDetail(){
 | 
						||
				uni.showLoading({
 | 
						||
					title:"正在获取答题详情",
 | 
						||
				})
 | 
						||
				this.$u.api.getExamRecordDetail(this.currentExam.id).then(res=>{
 | 
						||
					uni.hideLoading()
 | 
						||
					uni.setStorageSync('currentExam', res.data)
 | 
						||
					uni.redirectTo({
 | 
						||
						url:'/pages/exam/detail?examrecord='+this.currentExam.id
 | 
						||
					})
 | 
						||
				}).catch(e=>{
 | 
						||
				})
 | 
						||
			},
 | 
						||
			backToHome(){
 | 
						||
				uni.reLaunch({
 | 
						||
					url:'/pages/index/index'
 | 
						||
				})
 | 
						||
			}
 | 
						||
		},
 | 
						||
		onLoad(options){
 | 
						||
			this.currentExam = uni.getStorageSync('currentExam')
 | 
						||
		},
 | 
						||
		
 | 
						||
	}
 | 
						||
</script>
 | 
						||
 | 
						||
<style lang="scss" scoped>
 | 
						||
	.examImage {
 | 
						||
		width: 100%;
 | 
						||
		display: flex;
 | 
						||
		justify-content: center;
 | 
						||
		// background-color: #000000;
 | 
						||
		margin-top: 100rpx;
 | 
						||
		height: 300rpx;
 | 
						||
	}
 | 
						||
 | 
						||
	.finishText {
 | 
						||
		// margin: 100rpx 200rpx;
 | 
						||
		padding: 50rpx;
 | 
						||
		letter-spacing: 0.2em;
 | 
						||
		font-size: 32rpx;
 | 
						||
		display: flex;
 | 
						||
		flex-direction: column;
 | 
						||
		align-items: center;
 | 
						||
 | 
						||
		text {
 | 
						||
			color: $theme-color;
 | 
						||
			font-weight: bold;
 | 
						||
		}
 | 
						||
	}
 | 
						||
 | 
						||
	.btnArea {
 | 
						||
		display: flex;
 | 
						||
		margin-top: 50rpx;
 | 
						||
		justify-content: center;
 | 
						||
		align-items: center;
 | 
						||
		.btnClass {
 | 
						||
			width: 300rpx;
 | 
						||
		}
 | 
						||
	}
 | 
						||
 | 
						||
	.infoArea {
 | 
						||
		display: flex;
 | 
						||
		
 | 
						||
		flex-direction: column;
 | 
						||
		justify-content: center;
 | 
						||
	}
 | 
						||
</style>
 |