Commit cd6f9966 authored by Facius's avatar Facius

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

parent 3a6a7fc3
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<CircleProgress <CircleProgress
class="progress-view" class="progress-view"
active-color="#FFFFFF" active-color="#FFFFFF"
:percent="info.score" :percent="(info.score / info.pageTotalPoint) * 100"
inactive-color="rgba(255, 255, 255, 0.3)" inactive-color="rgba(255, 255, 255, 0.3)"
width="240" width="240"
border-width="8" border-width="8"
...@@ -127,10 +127,10 @@ export default { ...@@ -127,10 +127,10 @@ export default {
} }
}, },
isFull() { isFull() {
return this.info.score >= 100 return this.info.score >= this.info.pageTotalPoint
}, },
isPass() { isPass() {
return this.info.score >= 60 return this.info.score >= this.info.pageTotalPoint * 0.6
}, },
resultText() { resultText() {
return this.isPass ? '合格' : '不合格' return this.isPass ? '合格' : '不合格'
...@@ -162,11 +162,17 @@ export default { ...@@ -162,11 +162,17 @@ export default {
var random = [94, 99] var random = [94, 99]
if (this.info.score < 60) { if (this.info.score < 60) {
random = [55, 65] 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] 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] random = [86, 93]
} else if (this.info.score >= 90) { } else if (this.info.score >= this.info.pageTotalPoint * 0.9) {
random = [94, 99] random = [94, 99]
} }
...@@ -176,7 +182,7 @@ export default { ...@@ -176,7 +182,7 @@ export default {
onShareAppMessage(res) { onShareAppMessage(res) {
return { return {
title: '模考大师', title: '模考大师',
path: `/pages/learn/score?id=${this.id}` path: `/pages/learn/score?id=${this.id}`,
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -186,7 +192,7 @@ export default { ...@@ -186,7 +192,7 @@ export default {
let option = wx.getLaunchOptionsSync() let option = wx.getLaunchOptionsSync()
this.id = option.query.id this.id = option.query.id
} }
if (!this.id) { if (!this.id) {
this.$u.route({ this.$u.route({
url: 'pages/index/index', url: 'pages/index/index',
...@@ -213,6 +219,7 @@ export default { ...@@ -213,6 +219,7 @@ export default {
image: echoMap.studentId.avatarPath, image: echoMap.studentId.avatarPath,
score: res.point, score: res.point,
time: res.endDatetime, time: res.endDatetime,
pageTotalPoint: res.pageTotalPoint,
category: echoMap.questionWarehouseId.title, category: echoMap.questionWarehouseId.title,
type: '模拟考试', 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