|
@@ -160,16 +160,17 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
// (第三个任务在获取列表是做了 --getMycourse()) 第四个任务 期末考试
|
|
|
- checkTaskList4(sessionKey) {
|
|
|
+ checkTaskList4(sessionKey,id) {
|
|
|
wx.request({
|
|
|
url: app.globalData.publicUrl + '/wx/exam/clasExamstatus',
|
|
|
method: "post",
|
|
|
data: {
|
|
|
- sessionKey: sessionKey
|
|
|
+ sessionKey: sessionKey,
|
|
|
+ clasId: id
|
|
|
},
|
|
|
success: (res) => {
|
|
|
console.log(res.data, "我是第四个任务的检查状态")
|
|
|
- if (res.data.code == 0 && res.data.status == 0) {
|
|
|
+ if (res.data.code == 0 && res.data.status == 1) {
|
|
|
this.setData({
|
|
|
istask4: true
|
|
|
})
|
|
@@ -178,16 +179,17 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
// 检查第五个任务 综合反馈表
|
|
|
- checkTaskList5(sessionKey) {
|
|
|
+ checkTaskList5(sessionKey,id) {
|
|
|
wx.request({
|
|
|
url: app.globalData.publicUrl + '/wx/exam/status',
|
|
|
method: "post",
|
|
|
data: {
|
|
|
- sessionKey: sessionKey
|
|
|
+ sessionKey: sessionKey,
|
|
|
+ clasId: id
|
|
|
},
|
|
|
success: (res) => {
|
|
|
console.log(res.data, "我是第五个任务的检查状态")
|
|
|
- if (res.data.code == 0 && res.data.status == 0) {
|
|
|
+ if (res.data.code == 0 && res.data.status == 1) {
|
|
|
this.setData({
|
|
|
istask5: true
|
|
|
})
|
|
@@ -227,6 +229,8 @@ Page({
|
|
|
this.setData({
|
|
|
classInfo: res.data.data
|
|
|
})
|
|
|
+ this.checkTaskList4(sessionKey,res.data.data.id)
|
|
|
+ this.checkTaskList5(sessionKey,res.data.data.id)
|
|
|
} else {
|
|
|
wx.showModal({
|
|
|
content: "您当前还没有开放的班级!",
|
|
@@ -490,8 +494,6 @@ Page({
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- console.log(this.data.sessionKey);
|
|
|
- console.log(this.data.classInfo.id);
|
|
|
wx.request({
|
|
|
url: app.globalData.publicUrl + '/wx/exam/examList',
|
|
|
method: "post",
|
|
@@ -501,20 +503,40 @@ Page({
|
|
|
},
|
|
|
success: (res) => {
|
|
|
if (res.data.code == 0) {
|
|
|
- console.log(res.data);
|
|
|
- //let answersId = res.data.list[0].answersId ;
|
|
|
- console.log(res.data.list.length);
|
|
|
- if (res.data.list[0]) {
|
|
|
- if (res.data.list[0].answersId) {
|
|
|
- if (res.data.list[0].status == '1') {
|
|
|
- wx.navigateTo({
|
|
|
- url: '/pages/grade/grade?answersId=' + res.data.list[0].answersId,
|
|
|
- })
|
|
|
+ if (res.data.list.length == 0) {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '期末考试还未开始哦!'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (res.data.list[0]) {
|
|
|
+ if (res.data.list[0].answersId) {
|
|
|
+ if (res.data.list[0].status == '1') {
|
|
|
+ wx.request({
|
|
|
+ url: app.globalData.publicUrl + '/wx/answer/detail',
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ answersId: res.data.list[0].answersId
|
|
|
+ },
|
|
|
+ success: (res1) => {
|
|
|
+ if (res1.data.list[0].answerScore) {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/grade/grade?answersId=' + res.data.list[0].answersId,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '当前老师批阅中,请耐心等待'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'answerAfterclass');
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'answerAfterclass');
|
|
|
+ this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
|
|
|
}
|
|
|
- } else {
|
|
|
- this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -543,7 +565,6 @@ Page({
|
|
|
success: (res) => {
|
|
|
if (res.data.code == 0) {
|
|
|
console.log(res.data, "zonghe");
|
|
|
- //let answersId = res.data.list[0].answersId ;
|
|
|
console.log(res.data.list.length);
|
|
|
if (res.data.list[0]) {
|
|
|
if (res.data.list[0].answersId) {
|
|
@@ -740,8 +761,8 @@ Page({
|
|
|
this.getMycourse(sessionKey);
|
|
|
this.checkTaskList(sessionKey)
|
|
|
this.checkTaskList2(sessionKey)
|
|
|
- this.checkTaskList4(sessionKey)
|
|
|
- this.checkTaskList5(sessionKey)
|
|
|
+
|
|
|
+
|
|
|
this.checkTaskList6(sessionKey)
|
|
|
}
|
|
|
})
|