首页更改

This commit is contained in:
shijing 2022-11-15 13:08:00 +08:00
parent 0bad451fd6
commit 62a922d6aa
2 changed files with 20 additions and 19 deletions

View File

@ -11,15 +11,6 @@
// }]
// },
"pages": [
{
"path" : "pages/login/login",
"style" :
{
"navigationBarTitleText": "验证码登录",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/home/home",
"style" :
@ -27,8 +18,16 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/login/login",
"style" :
{
"navigationBarTitleText": "验证码登录",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/my/my",
"style" :

View File

@ -1,14 +1,12 @@
<template>
<view>
<image class="examImage" :src="imageSrc" mode="aspectFit"></image>
<view class="finishText">
恭喜您完成考试
</view>
<image v-if="currentExam.is_pass" class="examImage" :src="imageSrcPass" mode="aspectFit"></image>
<image v-else class="examImage" :src="imageSrc" mode="aspectFit"></image>
<view v-if="currentExam.is_pass" class="finishText">恭喜您完成考试</view>
<view v-else 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">
@ -22,7 +20,8 @@
export default {
data() {
return {
imageSrc: '/static/exam/result.png',
imageSrcPass: '/static/exam/result.png',
imageSrc: '/static/exam/error.png',
currentExam:{}
}
},
@ -33,7 +32,7 @@
uni.setStorageSync('currentExam', res.data);
debugger;
if (res.data.questions_.length>0){
uni.redirectTo({
uni.navigateTo({
url:'/pages/exam/detail?examrecord='+res.data.id
})
}
@ -49,13 +48,16 @@
},
backToHome(){
uni.reLaunch({
url:'/pages/index/index'
url:'/pages/exam/index'
})
}
},
onLoad(options){
this.currentExam = uni.getStorageSync('currentExam');
},
beforeRouteUpdate(){
uni.removeStorageSync('currentExam');
},
}
</script>