Commit cd6f9966 authored by Facius's avatar Facius

fix: 总分去后后端返回的值

parent 3a6a7fc3
......@@ -30,7 +30,7 @@
<CircleProgress
class="progress-view"
active-color="#FFFFFF"
:percent="info.score"
:percent="(info.score / info.pageTotalPoint) * 100"
inactive-color="rgba(255, 255, 255, 0.3)"
width="240"
border-width="8"
......@@ -127,10 +127,10 @@ export default {
}
},
isFull() {
return this.info.score >= 100
return this.info.score >= this.info.pageTotalPoint
},
isPass() {
return this.info.score >= 60
return this.info.score >= this.info.pageTotalPoint * 0.6
},
resultText() {
return this.isPass ? '合格' : '不合格'
......@@ -162,11 +162,17 @@ export default {
var random = [94, 99]
if (this.info.score < 60) {
random = [55, 65]
} else if (this.info.score >= 60 && this.info.score < 80) {
} else if (
this.info.score >= this.info.pageTotalPoint * 0.6 &&
this.info.score < this.info.pageTotalPoint * 0.8
) {
random = [66, 85]
} else if (this.info.score >= 80 && this.info.score < 90) {
} else if (
this.info.score >= this.info.pageTotalPoint * 0.8 &&
this.info.score < this.info.pageTotalPoint * 0.9
) {
random = [86, 93]
} else if (this.info.score >= 90) {
} else if (this.info.score >= this.info.pageTotalPoint * 0.9) {
random = [94, 99]
}
......@@ -176,7 +182,7 @@ export default {
onShareAppMessage(res) {
return {
title: '模考大师',
path: `/pages/learn/score?id=${this.id}`
path: `/pages/learn/score?id=${this.id}`,
}
},
onLoad(options) {
......@@ -186,7 +192,7 @@ export default {
let option = wx.getLaunchOptionsSync()
this.id = option.query.id
}
if (!this.id) {
this.$u.route({
url: 'pages/index/index',
......@@ -213,6 +219,7 @@ export default {
image: echoMap.studentId.avatarPath,
score: res.point,
time: res.endDatetime,
pageTotalPoint: res.pageTotalPoint,
category: echoMap.questionWarehouseId.title,
type: '模拟考试',
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment