|
@@ -34,7 +34,7 @@
|
|
|
<div class="user-manual-item-left-schedule">
|
|
|
<van-progress
|
|
|
:percentage="
|
|
|
- formatePercentageFun(item.getPoints, item.totaPonits)
|
|
|
+ formatePercentageFun(item.getPoints, item.totalPonits)
|
|
|
"
|
|
|
:show-pivot="false"
|
|
|
/>
|
|
@@ -92,7 +92,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: "答题",
|
|
|
- type: "LEARNING_COMPLETE",
|
|
|
+ type: "",
|
|
|
rule: "1分/每答对一道非今日必答题目",
|
|
|
isFinish: false,
|
|
|
getPoints: 0,
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: "专项答题",
|
|
|
- type: "WEEKLY_QUESTION",
|
|
|
+ type: "SPECIAL_QUESTIONS",
|
|
|
rule: "1分/每答对一道专项答题",
|
|
|
isFinish: false,
|
|
|
getPoints: 0,
|
|
@@ -139,7 +139,8 @@ export default {
|
|
|
WEEKLY_QUESTIONS: 0, // 每周考试
|
|
|
READ_5_MINS: 0, // 阅读时长
|
|
|
READ_2_HOURS: 0, // 阅读时长
|
|
|
- LEARNING_COMPLETE: 0 // 阅读完成
|
|
|
+ LEARNING_COMPLETE: 0, // 阅读完成
|
|
|
+ SPECIAL_QUESTIONS: 0 // 专项答题
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -165,6 +166,7 @@ export default {
|
|
|
res.data.forEach(element => {
|
|
|
this.sumPointsObj[element.event] += element.delta;
|
|
|
});
|
|
|
+ console.log("-------" + JSON.stringify(this.sumPointsObj));
|
|
|
this.updateGetPoints();
|
|
|
}
|
|
|
})
|
|
@@ -208,17 +210,17 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 格式化已获得的积分/总积分的数
|
|
|
- formatePercentageFun(getPoints, totaPonits) {
|
|
|
+ formatePercentageFun(getPoints, totalPonits) {
|
|
|
if (
|
|
|
(!getPoints && getPoints !== 0) ||
|
|
|
- (!totaPonits && totaPonits !== 0)
|
|
|
+ (!totalPonits && totalPonits !== 0)
|
|
|
) {
|
|
|
return 0;
|
|
|
}
|
|
|
- if (isNaN(getPoints) || isNaN(totaPonits)) {
|
|
|
+ if (isNaN(getPoints) || isNaN(totalPonits)) {
|
|
|
return 0;
|
|
|
}
|
|
|
- return Math.round((getPoints / totaPonits) * 100) || 0;
|
|
|
+ return Math.round((getPoints / totalPonits) * 100) || 0;
|
|
|
},
|
|
|
// 操作:返回
|
|
|
onClickLeft() {
|