ssfg 4 éve
szülő
commit
8bafbf668f

+ 1 - 1
app.json

@@ -1,5 +1,6 @@
 {
   "pages": [
+    "pages/myClass/myClass",
     "pages/welcome/welcome",
     "pages/groupsList/groupsList",
     "pages/answerAfterclass/answerAfterclass",
@@ -8,7 +9,6 @@
     "pages/studentRegistration/studentRegistration",
     "pages/dbDetails/dbDetails",
     "pages/dbVideo/dbVideo",
-    "pages/myClass/myClass",
     "pages/Identity/Identity",
     "pages/grade/grade",
     "pages/livePlayback/livePlayback",

+ 106 - 89
pages/answerAfterclass/answerAfterclass.js

@@ -19,6 +19,8 @@ Page({
     json.currentAnswer = e.detail.value;
     json.id = e.currentTarget.dataset.idx;
     json.questType = e.currentTarget.dataset.questtypes;
+    console.log(json, "josnsosjosjdosdjsodjsod");
+
     this.data.chooseValue[this.data.index] = json;
     const items = this.data.questionList[this.data.index].QuestChoice
     for (let i = 0, len = items.length; i < len; ++i) {
@@ -38,16 +40,15 @@ Page({
   checkboxChange: function (e) {
     console.log(e)
     const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
-    console.log(questionList,'我是选项');
+    console.log(questionList, '我是选项');
     console.log(this.data.index)
-    let data=questionList[this.data.index].QuestChoice;
+    let data = questionList[this.data.index].QuestChoice;
     let json = {};
-    let list=e.detail.value;
-    let valueData=[];
-    data.map(ite=>{
-      list.map(items=>{
-        if(ite.name==items)
-        {
+    let list = e.detail.value;
+    let valueData = [];
+    data.map(ite => {
+      list.map(items => {
+        if (ite.name == items) {
           valueData.push(ite.name)
         }
       })
@@ -56,6 +57,8 @@ Page({
     json.currentAnswer = aa;
     json.questType = e.currentTarget.dataset.questtypes;
     json.id = e.currentTarget.dataset.idx;
+    console.log(json, "chexboxsssssssssssssssssss");
+
     this.data.chooseValue[this.data.index] = json;
     const items = this.data.questionList[this.data.index].QuestChoice
     const values = e.detail.value
@@ -135,8 +138,8 @@ Page({
     })
     if (wx.getStorageSync('questionList' + wx.getStorageSync('answersId'))) {
       const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
-      console.log(questionList,"大阪烧");
-      
+      console.log(questionList, "大阪烧");
+
       const titleINDEX = wx.getStorageSync('titleINDEX' + wx.getStorageSync('answersId'));
       const chooseValue = wx.getStorageSync('chooseValue' + wx.getStorageSync('answersId'));
       console.log(wx.getStorageSync('questionList' + wx.getStorageSync('answersId')))
@@ -214,7 +217,7 @@ Page({
         console.log(this.data.questionList)
         wx.setStorageSync('titleINDEX' + wx.getStorageSync('answersId'), 0);
         wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), []),
-        wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+          wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
       },
       fail: () => {
         wx.hideLoading()
@@ -226,87 +229,101 @@ Page({
       mask: true,
       title: '加载中',
     })
-    if (currentAnswerTemp.length == 0) {
-      let arr = this.data.questionList.map(item => {
-        let json = {};
-        json.currentAnswer = '';
-        json.questType = item.QuestType;
-        json.id = item.id;
-        return json
-      });
-      wx.request({
-        url: app.globalData.publicUrl + '/wx/paper/commit',
-        method: "post",
-        data: {
-          sessionKey: this.data.sessionKey,
-          currentAnswerTemp: arr,
-          answersId: wx.getStorageSync('answersId')
-        },
-        success: (res) => {
-          wx.hideLoading();
-          if (res.data.code == 0) {
-            wx.showModal({
-              showCancel: false,
-              content: '恭喜您,提交答案成功,请耐心等待老师判卷',
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
-          } else {
-            wx.showModal({
-              showCancel: false,
-              content: res.data.msg,
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
+    console.log(currentAnswerTemp, "传值");
+    let indexs = currentAnswerTemp.findIndex(item => {
+      return !item
+    })
+    console.log(indexs, "sssssss");
+    if (indexs == -1) {
+      if (currentAnswerTemp.length == 0) {
+        let arr = this.data.questionList.map(item => {
+          let json = {};
+          json.currentAnswer = '';
+          json.questType = item.QuestType;
+          json.id = item.id;
+          return json
+        });
+        wx.request({
+          url: app.globalData.publicUrl + '/wx/paper/commit',
+          method: "post",
+          data: {
+            sessionKey: this.data.sessionKey,
+            currentAnswerTemp: arr,
+            answersId: wx.getStorageSync('answersId')
+          },
+          success: (res) => {
+            wx.hideLoading();
+            if (res.data.code == 0) {
+              wx.showModal({
+                showCancel: false,
+                content: '恭喜您,提交答案成功,请耐心等待老师判卷',
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            } else {
+              wx.showModal({
+                showCancel: false,
+                content: res.data.msg,
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            }
+          },
+          fail: () => {
+            wx.hideLoading()
           }
-        },
-        fail: () => {
-          wx.hideLoading()
-        }
-      })
-    } else {
-      wx.request({
-        url: app.globalData.publicUrl + '/wx/paper/commit',
-        method: "post",
-        data: {
-          sessionKey: this.data.sessionKey,
-          currentAnswerTemp: currentAnswerTemp,
-          answersId: wx.getStorageSync('answersId')
-        },
-        success: (res) => {
-          wx.hideLoading();
-          if (res.data.code == 0) {
-            wx.showModal({
-              showCancel: false,
-              content: '恭喜您,提交答案成功,请耐心等待老师判卷',
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
-          } else {
-            wx.showModal({
-              showCancel: false,
-              content: res.data.msg,
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
+        })
+      } else {
+        wx.request({
+          url: app.globalData.publicUrl + '/wx/paper/commit',
+          method: "post",
+          data: {
+            sessionKey: this.data.sessionKey,
+            currentAnswerTemp: currentAnswerTemp,
+            answersId: wx.getStorageSync('answersId')
+          },
+          success: (res) => {
+            wx.hideLoading();
+            if (res.data.code == 0) {
+              wx.showModal({
+                showCancel: false,
+                content: '恭喜您,提交答案成功,请耐心等待老师判卷',
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            } else {
+              wx.showModal({
+                showCancel: false,
+                content: res.data.msg,
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            }
+          },
+          fail: () => {
+            wx.hideLoading()
           }
-        },
-        fail: () => {
-          wx.hideLoading()
-        }
+        })
+      }
+    } else {
+      console.log("撒大声地所");
+      wx.showModal({
+        showCancel: false,
+        content: '当前第' + Number(indexs+1) + '没答,请答题',
       })
     }
+
   }
 })

+ 83 - 72
pages/answerAfterclasses/answerAfterclasses.js

@@ -255,80 +255,91 @@ Page({
   },
   submitAll(currentAnswerTemp) {
     console.log(currentAnswerTemp,"我是带过来的答案")
-    if (currentAnswerTemp.length == 0) {
-      let arr = this.data.questionList.map(item => {
-        let json = {};
-        json.currentAnswer = '';
-        json.questType = item.QuestType;
-        json.id = item.id;
-        return json
-      });
-      wx.request({
-        url: app.globalData.publicUrl + '/wx/paper/commit',
-        method: "post",
-        data: {
-          sessionKey: this.data.sessionKey,
-          currentAnswerTemp: arr,
-          answersId: wx.getStorageSync('answersId')
-        },
-        success: (res) => {
-          wx.hideLoading();
-          if (res.data.code == 0) {
-            wx.showModal({
-              showCancel: false,
-              content: '恭喜您,提交答案成功,请耐心等待老师判卷',
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
-          } else {
-            wx.showModal({
-              showCancel: false,
-              content: res.data.msg,
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
+    let indexs = currentAnswerTemp.findIndex(item => {
+      return !item
+    })
+    if (indexs == -1) {
+      if (currentAnswerTemp.length == 0) {
+        let arr = this.data.questionList.map(item => {
+          let json = {};
+          json.currentAnswer = '';
+          json.questType = item.QuestType;
+          json.id = item.id;
+          return json
+        });
+        wx.request({
+          url: app.globalData.publicUrl + '/wx/paper/commit',
+          method: "post",
+          data: {
+            sessionKey: this.data.sessionKey,
+            currentAnswerTemp: arr,
+            answersId: wx.getStorageSync('answersId')
+          },
+          success: (res) => {
+            wx.hideLoading();
+            if (res.data.code == 0) {
+              wx.showModal({
+                showCancel: false,
+                content: '恭喜您,提交答案成功,请耐心等待老师判卷',
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            } else {
+              wx.showModal({
+                showCancel: false,
+                content: res.data.msg,
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            }
           }
-        }
-      })
-    } else {
-      wx.request({
-        url: app.globalData.publicUrl + '/wx/paper/commit',
-        method: "post",
-        data: {
-          sessionKey: this.data.sessionKey,
-          currentAnswerTemp: currentAnswerTemp,
-          answersId: wx.getStorageSync('answersId')
-        },
-        success: (res) => {
-          wx.hideLoading();
-          if (res.data.code == 0) {
-            wx.showModal({
-              showCancel: false,
-              content: '恭喜您,提交答案成功,请耐心等待老师判卷',
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
-          } else {
-            wx.showModal({
-              showCancel: false,
-              content: res.data.msg,
-              success() {
-                wx.navigateBack({
-                  delta: 1
-                })
-              }
-            })
+        })
+      } else {
+        wx.request({
+          url: app.globalData.publicUrl + '/wx/paper/commit',
+          method: "post",
+          data: {
+            sessionKey: this.data.sessionKey,
+            currentAnswerTemp: currentAnswerTemp,
+            answersId: wx.getStorageSync('answersId')
+          },
+          success: (res) => {
+            wx.hideLoading();
+            if (res.data.code == 0) {
+              wx.showModal({
+                showCancel: false,
+                content: '恭喜您,提交答案成功,请耐心等待老师判卷',
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            } else {
+              wx.showModal({
+                showCancel: false,
+                content: res.data.msg,
+                success() {
+                  wx.navigateBack({
+                    delta: 1
+                  })
+                }
+              })
+            }
           }
-        }
+        })
+      }
+    }else {
+      console.log("撒大声地所");
+      wx.showModal({
+        showCancel: false,
+        content: '当前第' + Number(indexs+1) + '没答,请答题',
       })
     }
     // wx.request({

+ 2 - 0
pages/dbDetails/dbDetails.js

@@ -235,6 +235,8 @@ Page({
   chechEndStatus: function () {
     let _this = this;
     if (this.data.classInfo.id != -1) {
+      console.log(this.data.video_real_time)
+      console.log(this.data.courseTime / 1000 - 10)
       if (this.data.video_real_time > this.data.courseTime / 1000 - 10) {
         let isDone = 'studyLog.isDone'
         this.setData({

+ 1 - 4
pages/myMission/myMission.js

@@ -441,8 +441,6 @@ Page({
           content: "直播还未开始哦"
         })
         return false;
-
-
       }
     } else {
       if (this.data.currentId != null) {
@@ -453,10 +451,9 @@ Page({
               url: '../dbDetails/dbDetails?id=' + id
             })
           } else {
-            // 有未完成的但不是我 就不能跳转
             wx.showModal({
               showCancel: false,
-              content: "您的" + this.data.currentName + "课还未学完,快去学习吧"
+              content: "请确认您的 ‘" + this.data.currentName + "’ 这节课中的学习、考试、评价是否都已完成?"
             })
           }
         } else {

+ 1 - 1
project.config.json

@@ -24,7 +24,7 @@
 			"disablePlugins": [],
 			"outputPath": ""
 		},
-		"useCompilerModule": true,
+		"useCompilerModule": false,
 		"userConfirmedUseCompilerModuleSwitch": false
 	},
 	"compileType": "miniprogram",

+ 2 - 2
utils/util.js

@@ -1,6 +1,6 @@
 const globalData = {
-  // publicUrl: 'https://sqdx.jiaxintech.com'//测试地址
-  publicUrl: 'https://sqpx.jiaxintech.com'//正式地址
+  publicUrl: 'https://sqdx.jiaxintech.com'//测试地址
+  // publicUrl: 'https://sqpx.jiaxintech.com'//正式地址
   // publicUrl:'http://10.16.10.139'//ly
   // publicUrl:'http://10.16.4.19:80'//hyb
   //  publicUrl:'http://10.16.4.26:80'//zxq