|
@@ -1,58 +1,77 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
- <div class="result-box" v-if="score >= 90">
|
|
|
- <img class="img" :src="hege" />
|
|
|
- <span class="text">恭喜你,测试通过~</span>
|
|
|
- <div class="fraction-box">
|
|
|
- <span class="fraction">{{ score }}</span
|
|
|
- >分
|
|
|
- </div>
|
|
|
- <span class="hint">(满分:100;合格:90)</span>
|
|
|
- <span class="time">用时:{{ useTime }}</span>
|
|
|
- <span class="evaluation"
|
|
|
- >天赋异禀、骨骼惊奇,想来是百年难得一见的考试奇才。</span
|
|
|
- >
|
|
|
+ <view class="bg">
|
|
|
+ <m-nav-bar theme="black"></m-nav-bar>
|
|
|
+ <div class="result-box">
|
|
|
+ <img class="img" v-if="score >= 90" :src="hege" />
|
|
|
+ <img class="img" v-if="score < 90" :src="buhege" />
|
|
|
+ <view class="intro">
|
|
|
+ <div class="fraction-box">
|
|
|
+ <text class="fraction">{{ score }}</text>
|
|
|
+ </div>
|
|
|
+ <view v-if="score >= 90" class="text">恭喜你,测试通过~</view>
|
|
|
+ <view v-if="score < 90" class="text" style="color: red"
|
|
|
+ >抱歉,测试未通过~</view
|
|
|
+ >
|
|
|
+ <view class="hint">(满分:100;合格:90)</view>
|
|
|
+
|
|
|
+ <view class="time">
|
|
|
+ <text class="time-content">用时:{{ useTime }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="evaluation"
|
|
|
+ ><text v-if="score >= 90"
|
|
|
+ >天赋异禀、骨骼惊奇! \n 想来是百年难得一见的考试奇才!</text
|
|
|
+ >
|
|
|
+ <text v-if="score < 90"
|
|
|
+ >学车之路,任重而道远!\n 路漫漫其修远兮,吾将上下而求索。</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <div class="btn-box">
|
|
|
+ <m-button
|
|
|
+ width="270rpx"
|
|
|
+ height="90rpx"
|
|
|
+ @tap="goExerciseSpecify"
|
|
|
+ class="btn1"
|
|
|
+ text="错题重做"
|
|
|
+ />
|
|
|
+ <m-button
|
|
|
+ width="270rpx"
|
|
|
+ height="90rpx"
|
|
|
+ @tap="refreshTest"
|
|
|
+ class="btn2"
|
|
|
+ text="重新测试"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
</div>
|
|
|
- <div class="result-box" v-else>
|
|
|
+ <!-- <div class="result-box" >
|
|
|
<img class="img" :src="buhege" />
|
|
|
- <span class="text">抱歉,测试未通过~</span>
|
|
|
- <div class="fraction-box">
|
|
|
- <span class="fraction">{{ score }}</span
|
|
|
- >分
|
|
|
- </div>
|
|
|
- <span class="hint">(满分:100;合格:90)</span>
|
|
|
- <span class="time">用时:{{ useTime }}</span>
|
|
|
- <span class="evaluation"
|
|
|
- >学车之路,任重而道远!路漫漫其修远兮,吾将上下而求索。</span
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div class="btn-box">
|
|
|
- <m-button
|
|
|
- width="270rpx"
|
|
|
- height="90rpx"
|
|
|
- @tap="goExerciseSpecify"
|
|
|
- class="btn1"
|
|
|
- text="错题重做"
|
|
|
- />
|
|
|
- <m-button
|
|
|
- width="270rpx"
|
|
|
- height="90rpx"
|
|
|
- @tap="refreshTest"
|
|
|
- class="btn2"
|
|
|
- text="重新测试"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <view class="intro">
|
|
|
+ <text class="text">抱歉,测试未通过~</text>
|
|
|
+ <div class="fraction-box">
|
|
|
+ <text class="fraction">{{ score }}</text
|
|
|
+ >分
|
|
|
+ </div>
|
|
|
+ <text class="hint">(满分:100;合格:90)</text>
|
|
|
+ <view class="time">
|
|
|
+ <text class="time-content">用时:{{ useTime }}</text>
|
|
|
+ </view>
|
|
|
+ <text class="evaluation"
|
|
|
+ >学车之路,任重而道远!路漫漫其修远兮,吾将上下而求索。</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ </div> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-
|
|
|
import api from "@/api/index";
|
|
|
import utils from "@/utils/index";
|
|
|
+import mNavBar from "../../components/m-nav-bar/m-nav-bar.vue";
|
|
|
export default {
|
|
|
+ components: { mNavBar },
|
|
|
data() {
|
|
|
return {
|
|
|
- hege:"https://ct.zzxcx.net/ctjk/mp-wx/mockExamEnd/%E8%80%83%E8%AF%95%E5%90%88%E6%A0%BC.png",
|
|
|
- buhege:"https://ct.zzxcx.net/ctjk/mp-wx/mockExamEnd/%E8%80%83%E8%AF%95%E4%B8%8D%E5%90%88%E6%A0%BC.png",
|
|
|
+ hege: "https://ct.zzxcx.net/ctjk/mp-wx/mockExamEnd/smile.png",
|
|
|
+ buhege: "https://ct.zzxcx.net/ctjk/mp-wx/mockExamEnd/sad.png",
|
|
|
score: 0,
|
|
|
useTime: "",
|
|
|
subject: 1,
|
|
@@ -83,12 +102,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
goExerciseSpecify() {
|
|
|
- if(!this.query.questionIds){
|
|
|
+ if (!this.query.questionIds) {
|
|
|
uni.showToast({
|
|
|
- title:"没有错题",
|
|
|
- icon:"none"
|
|
|
- })
|
|
|
- return
|
|
|
+ title: "没有错题",
|
|
|
+ icon: "none",
|
|
|
+ });
|
|
|
+ return;
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
url:
|
|
@@ -123,58 +142,92 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.bg {
|
|
|
+ background-image: url("https://ct.zzxcx.net/ctjk/mp-wx/mockExamEnd/bg.png");
|
|
|
+}
|
|
|
.result-box {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
- padding: 60rpx 30rpx;
|
|
|
+ padding: 30rpx 30rpx;
|
|
|
.img {
|
|
|
- width: 246px;
|
|
|
- height: 216px;
|
|
|
- }
|
|
|
- .text {
|
|
|
- margin-top: 23px;
|
|
|
- font-size: 15px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #5c6066;
|
|
|
- line-height: 23px;
|
|
|
+ width: 624rpx;
|
|
|
+ height: 529rpx;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
}
|
|
|
- .fraction-box {
|
|
|
- font-size: 15px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: bold;
|
|
|
- color: #8a9099;
|
|
|
- line-height: 23px;
|
|
|
- margin-top: 30px;
|
|
|
- .fraction {
|
|
|
- font-size: 60px;
|
|
|
+ .intro {
|
|
|
+ width: 100%;
|
|
|
+ display: inline-block;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ height: 906rpx;
|
|
|
+ margin-top: 224rpx;
|
|
|
+ .text {
|
|
|
+ font-size: 15px;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #01c18d;
|
|
|
+ line-height: 23px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .fraction-box {
|
|
|
+ font-size: 15px;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: bold;
|
|
|
- color: #ff4d53;
|
|
|
+ color: #8a9099;
|
|
|
+ margin-top: 30px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 220rpx;
|
|
|
+ height: auto;
|
|
|
+ .fraction {
|
|
|
+ font-size: 87rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ff4d53;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .hint {
|
|
|
+ font-size: 13px;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #8a9099;
|
|
|
+ line-height: 23px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .time {
|
|
|
+ border-radius: 10rpx;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ .time-content {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #498ef5;
|
|
|
+ line-height: 60rpx;
|
|
|
+ text-align: center;
|
|
|
+ color: #498ef5;
|
|
|
+ border-radius: 15rpx;
|
|
|
+ background: #e4eefe;
|
|
|
+ padding: 20rpx 60rpx;
|
|
|
+ width: auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .evaluation {
|
|
|
+ margin-top: 30px;
|
|
|
+ font-size: 15px;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #5c6066;
|
|
|
+ line-height: 23px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
- }
|
|
|
- .hint {
|
|
|
- font-size: 13px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #8a9099;
|
|
|
- line-height: 23px;
|
|
|
- }
|
|
|
- .time {
|
|
|
- font-size: 13px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #498ef5;
|
|
|
- line-height: 23px;
|
|
|
- }
|
|
|
- .evaluation {
|
|
|
- margin-top: 30px;
|
|
|
- font-size: 15px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #5c6066;
|
|
|
- line-height: 23px;
|
|
|
}
|
|
|
}
|
|
|
.btn-box {
|
|
@@ -188,11 +241,14 @@ export default {
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: 400;
|
|
|
line-height: 23px;
|
|
|
+ margin-top: 90rpx;
|
|
|
.btn1 {
|
|
|
background-color: #498ef5;
|
|
|
+ border-radius: 40rpx;
|
|
|
}
|
|
|
.btn2 {
|
|
|
background-color: #01c18d;
|
|
|
+ border-radius: 40rpx;
|
|
|
}
|
|
|
}
|
|
|
</style>
|