|
@@ -2,44 +2,28 @@
|
|
|
<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" />
|
|
|
+ <img class="img" v-if="score >= hegeScore" :src="hege" />
|
|
|
+ <img class="img" v-if="score < hegeScore" :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 v-if="score >= hegeScore" class="text">恭喜你,测试通过~</view>
|
|
|
+ <view v-if="score < hegeScore" class="text" style="color: red">抱歉,测试未通过~</view>
|
|
|
+ <view class="hint">{{ '(满分:' + totalScore + ';合格:' + hegeScore }})</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 class="evaluation"><text v-if="score >= hegeScore">天赋异禀、骨骼惊奇! \n 想来是百年难得一见的考试奇才!</text>
|
|
|
+ <text v-if="score < hegeScore">学车之路,任重而道远!\n 路漫漫其修远兮,吾将上下而求索。</text>
|
|
|
+ </view>
|
|
|
+ <view @click="goSkillBook" style="text-align: center;margin-top: 40rpx;">
|
|
|
+ <image mode="widthFix" style="width: 590rpx;margin: 0 auto;" :src="buyExamSerectBg"></image>
|
|
|
</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="重新测试"
|
|
|
- />
|
|
|
+ <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>
|
|
@@ -66,13 +50,18 @@
|
|
|
import api from "@/api/index";
|
|
|
import utils from "@/utils/index";
|
|
|
import mNavBar from "../../components/m-nav-bar/m-nav-bar.vue";
|
|
|
+import buyExamSerectBg from './static/buyExamSerect.gif'
|
|
|
+import { mapGetters,mapState } from "vuex";
|
|
|
export default {
|
|
|
components: { mNavBar },
|
|
|
data() {
|
|
|
return {
|
|
|
+ buyExamSerectBg,
|
|
|
hege: "https://ndata.zzxcx.net/ctjk/mp-wx/mockExamEnd/smile.png",
|
|
|
buhege: "https://ndata.zzxcx.net/ctjk/mp-wx/mockExamEnd/sad.png",
|
|
|
score: 0,
|
|
|
+ totalScore: 0,
|
|
|
+ hegeScore: 0,
|
|
|
useTime: "",
|
|
|
subject: 1,
|
|
|
query: {},
|
|
@@ -86,6 +75,14 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ goSkillBook(){
|
|
|
+ let that =this
|
|
|
+ console.log(that.nkjk_sph)
|
|
|
+ wx.openChannelsActivity({
|
|
|
+ finderUserName:that.nkjk_sph.video_accout_id,
|
|
|
+ feedId:that.nkjk_sph.skill_book
|
|
|
+ })
|
|
|
+ },
|
|
|
refreshTest() {
|
|
|
let routes = getCurrentPages();
|
|
|
if (routes.length < 2) {
|
|
@@ -119,11 +116,16 @@ export default {
|
|
|
onLoad(query) {
|
|
|
this.query = query;
|
|
|
// console.log(getCurrentPages())
|
|
|
- this.score = query.score;
|
|
|
+ this.score = Number(query.score);
|
|
|
+
|
|
|
this.useTime = query.useTime;
|
|
|
this.subject = query.subject;
|
|
|
+ this.totalScore = Number(query.totalScore)
|
|
|
this.gs = query.gs;
|
|
|
-
|
|
|
+ this.hegeScore = Math.ceil(this.totalScore * 0.9)
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['nkjk_sph'])
|
|
|
},
|
|
|
};
|
|
|
//提交考试成绩
|
|
@@ -138,26 +140,35 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.bg {
|
|
|
background-image: url("https://ndata.zzxcx.net/ctjk/mp-wx/mockExamEnd/bg.png");
|
|
|
+ width: 100%;
|
|
|
+ min-height: 100vh;
|
|
|
+ padding-bottom: constant(safe-area-inset-bottom);
|
|
|
+ padding-bottom: env(safe-area-inset-bottom);
|
|
|
}
|
|
|
+
|
|
|
.result-box {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
padding: 30rpx 30rpx;
|
|
|
+
|
|
|
.img {
|
|
|
width: 624rpx;
|
|
|
height: 529rpx;
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
}
|
|
|
+
|
|
|
.intro {
|
|
|
width: 100%;
|
|
|
display: inline-block;
|
|
|
flex-wrap: wrap;
|
|
|
background: #fff;
|
|
|
border-radius: 20rpx;
|
|
|
- height: 906rpx;
|
|
|
+ height: auto;
|
|
|
+ padding-bottom: 20rpx;
|
|
|
margin-top: 224rpx;
|
|
|
+
|
|
|
.text {
|
|
|
font-size: 15px;
|
|
|
font-family: PingFang SC;
|
|
@@ -166,16 +177,17 @@ export default {
|
|
|
line-height: 23px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.fraction-box {
|
|
|
font-size: 15px;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: bold;
|
|
|
color: #8a9099;
|
|
|
- margin-top: 30px;
|
|
|
width: 100%;
|
|
|
text-align: center;
|
|
|
- margin-top: 220rpx;
|
|
|
+ margin-top: 160rpx;
|
|
|
height: auto;
|
|
|
+
|
|
|
.fraction {
|
|
|
font-size: 87rpx;
|
|
|
font-family: PingFang SC;
|
|
@@ -183,6 +195,7 @@ export default {
|
|
|
color: #ff4d53;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.hint {
|
|
|
font-size: 13px;
|
|
|
font-family: PingFang SC;
|
|
@@ -192,11 +205,13 @@ export default {
|
|
|
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;
|
|
@@ -224,6 +239,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.btn-box {
|
|
|
margin: 0 auto;
|
|
|
width: 600rpx;
|
|
@@ -235,11 +251,13 @@ export default {
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: 400;
|
|
|
line-height: 23px;
|
|
|
- margin-top: 90rpx;
|
|
|
+ margin-top: 40rpx;
|
|
|
+
|
|
|
.btn1 {
|
|
|
background-color: #498ef5;
|
|
|
border-radius: 40rpx;
|
|
|
}
|
|
|
+
|
|
|
.btn2 {
|
|
|
background-color: #01c18d;
|
|
|
border-radius: 40rpx;
|