Jelajahi Sumber

Merge branch 'master' of http://git.cc-lotus.info/ssfg/OnlineTraining0622

roose 5 tahun lalu
induk
melakukan
bedfe55e42

+ 1 - 0
pages/Identity/Identity.js

@@ -59,6 +59,7 @@ Page({
     })
     // let _this = this;
     if (this.data.isRz == 0) {
+      wx.hideLoading()
       const params = e.detail.value
       if (!this.WxValidate.checkForm(params)) {
         const error = this.WxValidate.errorList[0]

+ 19 - 21
pages/answerAfterclass/answerAfterclass.js

@@ -273,7 +273,7 @@ Page({
     if (wx.getStorageSync('questionList' + wx.getStorageSync('answersId'))) {
       console.log("缓村了锕");
       const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
-    
+
       this.setData({
         questionList: questionList,
         answersId: wx.getStorageSync('answersId'),
@@ -281,11 +281,11 @@ Page({
         index: wx.getStorageSync('titleINDEX' + wx.getStorageSync('answersId')),
       })
       console.log(this.data.questionList, "show 缓存的数据");
-    }else{
+    } else {
       console.log("无缓存");
       this.allShi(options.id, options.paperId, sessionKey);
     }
-    
+
 
   },
 
@@ -344,29 +344,27 @@ Page({
         answersId: wx.getStorageSync('answersId')
       },
       success: (res) => {
-        console.log(res);
         wx.hideLoading();
-        if (res.data.msg == '请勿重复提交') {
+        if (res.data.code == 0) {
           wx.showModal({
             showCancel: false,
-            content: '当前老师批阅中,' + res.data.msg,
-            success(res) {}
+            content: '恭喜您,提交答案成功,请耐心等待老师判卷',
+            success() {
+              wx.navigateBack({
+                delta: 1
+              })
+            }
           })
         } else {
-          if (res.data.code == 0) {
-            wx.showModal({
-              showCancel: false,
-              content: '恭喜您,提交答案成功,请耐心等待老师判卷',
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            }) 
-            // wx.switchTab({
-            //   url: '/pages/myClass/myClass',
-            // })
-          }
+          wx.showModal({
+            showCancel: false,
+            content: res.data.msg,
+            success() {
+              wx.navigateBack({
+                delta: 1
+              })
+            }
+          })
         }
       }
     })

+ 34 - 27
pages/answerAfterclasses/answerAfterclasses.js

@@ -280,11 +280,11 @@ Page({
         index: wx.getStorageSync('titleINDEX' + wx.getStorageSync('answersId')),
       })
       console.log(this.data.questionList, "show 缓存的数据");
-    }else{
+    } else {
       console.log("无缓存");
       this.allShi(options.id, options.paperId, sessionKey);
     }
-    
+
 
   },
 
@@ -340,36 +340,43 @@ Page({
       },
       success: (res) => {
         console.log(res);
-        if (res.data.msg == '请勿重复提交') {
+        // if (res.data.msg == '请勿重复提交') {
+        //   wx.showModal({
+        //     showCancel: false,
+        //     content: '当前老师批阅中,' + res.data.msg,
+        //     success(res) {}
+        //   })
+        // } else {
+        if (res.data.code == 0) {
+          console.log(res, "为我么我们微妙"); // 提交答案是后
+          // this.setData({
+          //   answersId: res.data.answersId
+          // })
+          // this.allShi(id, paperId, sessionKey);
           wx.showModal({
             showCancel: false,
-            content: '当前老师批阅中,' + res.data.msg,
-            success(res) {}
+            content: '恭喜您,提交答案成功,请耐心等待老师判卷',
+            success() {
+              wx.navigateBack({
+                delta: 1
+              })
+            }
           })
+          // wx.switchTab({
+          //   url: '/pages/testAnswer/testAnswer',
+          // })
+
         } else {
-          if (res.data.code == 0) {
-            console.log(res, "为我么我们微妙"); // 提交答案是后
-            // this.setData({
-            //   answersId: res.data.answersId
-            // })
-            // this.allShi(id, paperId, sessionKey);
-            wx.showModal({
-              showCancel: false,
-              content: '恭喜您,提交答案成功,请耐心等待老师判卷',
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
-            // wx.switchTab({
-            //   url: '/pages/testAnswer/testAnswer',
-            // })
-           
-          }
+          wx.showModal({
+            showCancel: false,
+            content: res.data.msg,
+            success() {
+              wx.navigateBack({
+                delta: 1
+              })
+            }
+          })
         }
-
-
       }
     })
   }

+ 25 - 10
pages/feedBack/feedBack.js

@@ -229,8 +229,8 @@ Page({
     wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
     wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
     console.log(this.data.questionList);
-    console.log( this.data.chooseValue,"0000");
-    
+    console.log(this.data.chooseValue, "0000");
+
     // this.data.questionList[this.data.index].checked = e.detail.value;
 
     // this.setData({
@@ -406,23 +406,38 @@ Page({
       },
       success: (res) => {
         console.log(res);
-        if (res.data.msg == "请勿重复提交") {
+        if (res.data.code == 0) {
           wx.showModal({
             showCancel: false,
-            content: res.data.msg,
-            success(res) {}
+            content: '提交成功',
+            success() {
+              wx.navigateBack({
+                delta: 1
+              })
+            }
           })
         } else {
-          wx.switchTab({
-            url: '/pages/myClass/myClass',
+          wx.showModal({
+            showCancel: false,
+            content: res.data.msg
           })
         }
+        // console.log(res);
+        // if (res.data.msg == "请勿重复提交") {
+        //   wx.showModal({
+        //     showCancel: false,
+        //     content: res.data.msg,
+        //     success(res) {}
+        //   })
+        // } else {
+        //   wx.switchTab({
+        //     url: '/pages/myClass/myClass',
+        //   })
+        // }
 
       }
     })
-
-
-    let isTrue = false;
+    // let isTrue = false;
     // this.data.chooseValue.forEach(item => {
     //   console.log(item, "123123");
     //   if (item.currentAnswer) {

+ 44 - 43
pages/myClass/myClass.js

@@ -282,6 +282,7 @@ Page({
           kcArr: res.data.list,
           istask2: res.data.allDone
         });
+        console.log(this.data.kcArr, "9999999999999999")
         for (let i = 0; i < res.data.list.length; i++) {
           if (res.data.list[i].isStudyDone == 0) {
             this.setData({
@@ -382,29 +383,29 @@ Page({
         })
       }
     } else {
-      if (id == this.data.IngCourseArr.id) {
-        if (e.currentTarget.dataset.item.isLive == 1) {
-          if (e.currentTarget.dataset.item.isActive == 1) {
-            wx.navigateTo({
-              url: '../zbDetails/zbDetails?id=' + id
-            })
-          } else {
-            wx.showModal({
-              showCancel: false,
-              content: "直播还未开始哦"
-            })
-            return false;
-          }
+      if (e.currentTarget.dataset.item.isLive == 1) {
+        if (e.currentTarget.dataset.item.isActive == 1) {
+          wx.navigateTo({
+            url: '../zbDetails/zbDetails?id=' + id
+          })
         } else {
+          wx.showModal({
+            showCancel: false,
+            content: "直播还未开始哦"
+          })
+          return false;
+        }
+      } else {
+        if (id == this.data.IngCourseArr.id) {
           wx.navigateTo({
             url: '../dbDetails/dbDetails?id=' + id
           })
+        } else {
+          wx.showModal({
+            showCancel: false,
+            content: "您的" + this.data.IngCourseArr.courseName + "课还未学完,快去学习吧"
+          })
         }
-      } else {
-        wx.showModal({
-          showCancel: false,
-          content: "您的" + this.data.IngCourseArr.courseName + "课还未学完,快去学习吧"
-        })
       }
     }
   },
@@ -603,35 +604,35 @@ Page({
               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: '当前老师批阅中,请耐心等待'
-                        })
-                      }
+            // 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.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
+                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'answerAfterclass');
               }
+            } else {
+              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
             }
+            // }
           }
         }
       }

+ 2 - 2
pages/myClass/myClass.wxss

@@ -19,6 +19,7 @@
   width: 57rpx;
   height: 57rpx;
   margin-right: 30rpx;
+  border-radius: 50%;
 }
 
 .zw {
@@ -124,8 +125,7 @@
 
 .spfm {
   width: 128rpx;
-  height: auto;
-  /* margin-top: 20rpx; */
+  height: 128rpx;
   float: left;
   margin-top: 35rpx;
   margin-left: 20rpx;

+ 5 - 5
pages/myMission/myMission.js

@@ -205,14 +205,14 @@ Page({
   //第六个任务 领取结业证
   checkTaskList6(sessionKey) {
     wx.request({
-      url: app.globalData.publicUrl + '/wx/student/wxGraduation',
+      url: app.globalData.publicUrl + '/wx/student/selStudentSessionKey',
       method: "post",
       data: {
         sessionKey: sessionKey
       },
       success: (res) => {
         console.log(res.data, "我是第六个任务的检查状态")
-        if (res.data.code == 0 && res.data.code == 0) {
+        if (res.data.code == 0 &&res.data.data.graduation == 0 ) {
           this.setData({
             istask6: true
           })
@@ -340,7 +340,7 @@ Page({
   },
   // 去学习
   goStudy(e) {
-    if (this.data.istask1 == false) {
+    if (this.data.istask2 == false) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"
@@ -397,7 +397,7 @@ Page({
   },
   // 去考试
   gokhAnswer(e) {
-    if (this.data.istask1 == false) {
+    if (this.data.istask2 == false) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"
@@ -443,7 +443,7 @@ Page({
   },
   //去评价
   gopjClass(e) {
-    if (this.data.istask1 == false) {
+    if (this.data.istask2 == false) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"