Commit 62dc9d8c authored by 林文清's avatar 林文清

fix:学习

parent f76408c5
...@@ -657,6 +657,15 @@ export default { ...@@ -657,6 +657,15 @@ export default {
let examResult = res.data.examLevelResult; let examResult = res.data.examLevelResult;
this.examList[i].status = this.examList[i].status =
examResult != "" ? examResult : "未通过"; examResult != "" ? examResult : "未通过";
//动态获取条件
let ruleDisc = res.data.ruleDisc;
let targetIndex = ruleDisc.indexOf('(');
if(targetIndex){
this.examList[i].condition = ruleDisc.substr(targetIndex + 1).replace(')', '');
}
// examStatus 用户考试状态 0考试中 1考试完成 2未参与 // examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data; that.exam = res.data;
console.log(that.exam); console.log(that.exam);
...@@ -695,13 +704,11 @@ export default { ...@@ -695,13 +704,11 @@ export default {
].questionTime; ].questionTime;
var examInfo = this.examList[index]; var examInfo = this.examList[index];
if (examInfo.examStatus == 0) { if (examInfo.examStatus == 0) {
console.log("这是试卷id", examInfo.id);
wx.navigateTo({ wx.navigateTo({
url: "/pages/learn/answer?examId=" + examInfo.id, // url: "/pages/learn/answer?examId=" + examInfo.id,
url: "/pages/learn/assessment?examId=" + examInfo.id,
}); });
} else if (examInfo.examStatus == 1) { } else if (examInfo.examStatus == 1) {
// examInfo.status = '通过';
if (examInfo.status == "已通过") { if (examInfo.status == "已通过") {
wx.navigateTo({ wx.navigateTo({
url: url:
......
...@@ -266,6 +266,8 @@ ...@@ -266,6 +266,8 @@
param.status = this.status = 1 param.status = this.status = 1
}else if(nowTime % this.howTimeToUpdateLearnedStatus != 0){ }else if(nowTime % this.howTimeToUpdateLearnedStatus != 0){
return return
}else{
param.status = 0;
} }
this.$u.api.updateLearnCourses(param).then((res) => {}).catch((err) => { this.$u.api.updateLearnCourses(param).then((res) => {}).catch((err) => {
console.log(err) console.log(err)
...@@ -470,7 +472,7 @@ ...@@ -470,7 +472,7 @@
width: 280rpx; width: 280rpx;
height: 150rpx; height: 150rpx;
margin-right: 23rpx; margin-right: 23rpx;
display: inline-block; display: inline-grid;
background-color: #F4F5F7; background-color: #F4F5F7;
border-radius: 12rpx; border-radius: 12rpx;
padding: 20rpx; padding: 20rpx;
......
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