ssfg 5 years ago
parent
commit
177ec6ae61

+ 4 - 3
app.json

@@ -1,5 +1,6 @@
 {
 {
   "pages": [
   "pages": [
+    
     "pages/welcome/welcome",
     "pages/welcome/welcome",
     "pages/personInfo/personInfo",
     "pages/personInfo/personInfo",
     "pages/last/last",
     "pages/last/last",
@@ -16,7 +17,7 @@
     "pages/answerAfterclass/answerAfterclass",
     "pages/answerAfterclass/answerAfterclass",
     "pages/feedBackDetail/feedBackDetail",
     "pages/feedBackDetail/feedBackDetail",
     "pages/evaluationCourseDetail/evaluationCourseDetail",
     "pages/evaluationCourseDetail/evaluationCourseDetail",
-   
+    "pages/historyClass/historyClass",
     "pages/onlineClass/onlineClass",
     "pages/onlineClass/onlineClass",
     "pages/dbDetails/dbDetails",
     "pages/dbDetails/dbDetails",
     "pages/dbVideo/dbVideo",
     "pages/dbVideo/dbVideo",
@@ -33,8 +34,8 @@
     "pages/Identity/Identity",
     "pages/Identity/Identity",
     "pages/myTraining/myTraining",
     "pages/myTraining/myTraining",
     "pages/agoClass/agoClass",
     "pages/agoClass/agoClass",
-    "pages/grade/grade",
-    "pages/historyClass/historyClass"
+    "pages/grade/grade"
+    
 
 
 
 
   ],
   ],

+ 0 - 2
pages/answerAfterclass/answerAfterclass.wxml

@@ -56,8 +56,6 @@
 <view wx:if="{{questionList[index].QuestType == 3}}" data-idx='{{questionList[index].id}}'>
 <view wx:if="{{questionList[index].QuestType == 3}}" data-idx='{{questionList[index].id}}'>
 	<textarea data-questTypes='{{questionList[index].QuestType}}' data-idx='{{questionList[index].id}}' bindinput='bindTextAreaBlur' value="{{questionList[index].currentAnswer}}" placeholder="请输入答案" />
 	<textarea data-questTypes='{{questionList[index].QuestType}}' data-idx='{{questionList[index].id}}' bindinput='bindTextAreaBlur' value="{{questionList[index].currentAnswer}}" placeholder="请输入答案" />
 	</view>
 	</view>
-
-
 <van-button bindtap='nextSubmit' wx:if="{{index == questionList.length-1}}" round type="default">提交答案</van-button>
 <van-button bindtap='nextSubmit' wx:if="{{index == questionList.length-1}}" round type="default">提交答案</van-button>
 <van-button wx:else round type="default" bindtap='nextSubmit'>下一题</van-button>
 <van-button wx:else round type="default" bindtap='nextSubmit'>下一题</van-button>
 <van-button wx:if='{{index !=0}}' round type="default" bindtap='upSubmit'>上一题</van-button>
 <van-button wx:if='{{index !=0}}' round type="default" bindtap='upSubmit'>上一题</van-button>

+ 1 - 1
pages/dbDetails/dbDetails.js

@@ -130,7 +130,7 @@ Page({
     }
     }
     if (aa == 1) {
     if (aa == 1) {
       if (currentTime > jump_time && currentTime - jump_time > 3) {
       if (currentTime > jump_time && currentTime - jump_time > 3) {
-        _this.data.videoContextvideoContext.seek(_this.data.video_real_time)
+        _this.data.videoContext.seek(_this.data.video_real_time)
         wx.showToast({
         wx.showToast({
           title: '未完整看完该视频,不能快进',
           title: '未完整看完该视频,不能快进',
           icon: 'none',
           icon: 'none',

+ 72 - 11
pages/historyClass/historyClass.js

@@ -6,16 +6,6 @@ Page({
     kcArr: [],
     kcArr: [],
     showZhfk: true
     showZhfk: true
   },
   },
-  lq() {
-    this.setData({
-      showzs: true
-    });
-  },
-  onClose1() {
-    this.setData({
-      showzs: false
-    });
-  },
   // 跳转直播点播页面
   // 跳转直播点播页面
   goStudy(e) {
   goStudy(e) {
     let id = e.currentTarget.dataset.item.id
     let id = e.currentTarget.dataset.item.id
@@ -90,8 +80,79 @@ Page({
     const sessionKey = await tools.checkSessionAndLogin();
     const sessionKey = await tools.checkSessionAndLogin();
     this.getArr(sessionKey);
     this.getArr(sessionKey);
   },
   },
-  onLoad(options) {
+  goWrite2() {
+    if (this.data.istask3 == false) {
+      wx.showModal({
+        showCancel: false,
+        content: "请按照任务顺序执行哦!"
+      })
+      return false
+    }
+    console.log(this.data.sessionKey, "dayin");
+    console.log(this.data.classInfo.id);
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/quesExamList',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        questSub: '1',
+        clasId: this.data.id
+      },
+      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) {
+              if (res.data.list[0].status == '1') {
+                wx.navigateTo({
+                  url: '/pages/feedBackDetail/feedBackDetail?answersId=' + res.data.list[0].answersId,
+                })
+              } else {
+                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'feedBack');
+              }
+            } else {
+              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'feedBack');
+            }
+          }
+        }
+      }
+    })
+  },
+  toPath(id, paperId, answersId, address, status) {
+    wx.navigateTo({
+      url: '/pages/' + address + '/' + address + '?id=' + id + '&paperId=' + paperId + '&answersId=' + answersId + '&status=' + status,
+    })
+  },
+  beginKao(id, paperId, sessionKey, address) {
+    console.log(paperId, "8888888");
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/begin',
+      method: "post",
+      data: {
+        sessionKey: sessionKey,
+        id: id,
+        paperId: paperId
+      },
+      success: (res) => {
+        console.log(res);
+        if (res.data.code == 0) {
+          console.log(res, "为我么我们微妙"); // 提交答案是后
+          this.setData({
+            status: res.data.status
+          })
+          this.toPath(id, paperId, res.data.answersId, address, );
+        }
+      }
+    })
+  },
+  async onLoad(options) {
     console.log(options)
     console.log(options)
+    const sessionKey = await tools.checkSessionAndLogin();
+    this.setData({
+      sessionKey: sessionKey
+    })
     this.setData({
     this.setData({
       id: options.id,
       id: options.id,
       name: options.name,
       name: options.name,

+ 106 - 49
pages/myClass/myClass.js

@@ -14,7 +14,11 @@ Page({
     status: '', //状态
     status: '', //状态
     myCanvasId: 0,
     myCanvasId: 0,
     byzsbj: "../../images/zsbj.jpg",
     byzsbj: "../../images/zsbj.jpg",
-    IngCourseArr: [] //如果有正在进行的课就存一下
+    IngCourseArr: [], //如果有正在进行的课就存一下
+    istask1: false, //学员登记表是否完成
+    istask2: false, //课程是否完成
+    istask3: false, //期末考试是否完成
+    istask4: false, //综合反馈是否完成
   },
   },
   // 更多
   // 更多
   listToggle: function () {
   listToggle: function () {
@@ -85,6 +89,13 @@ Page({
   //   })
   //   })
   // },
   // },
   gokhAnswer(e) {
   gokhAnswer(e) {
+    if (this.data.istask1 == false) {
+      wx.showModal({
+        showCancel: false,
+        content: "请按照任务顺序执行哦!"
+      })
+      return false
+    }
     let isStudyDone = e.currentTarget.dataset.item.isStudyDone
     let isStudyDone = e.currentTarget.dataset.item.isStudyDone
     let isExam = e.currentTarget.dataset.item.isExam
     let isExam = e.currentTarget.dataset.item.isExam
     if (isStudyDone != 1) {
     if (isStudyDone != 1) {
@@ -100,7 +111,7 @@ Page({
           method: "post",
           method: "post",
           data: {
           data: {
             sessionKey: this.data.sessionKey,
             sessionKey: this.data.sessionKey,
-            courseId: e.currentTarget.dataset.item.courseid,
+            courseId: e.currentTarget.dataset.item.id,
             clasId: this.data.classInfo.id
             clasId: this.data.classInfo.id
           },
           },
           success: (res) => {
           success: (res) => {
@@ -131,6 +142,13 @@ Page({
   },
   },
   //我的班级去评价
   //我的班级去评价
   gopjClass(e) {
   gopjClass(e) {
+    if (this.data.istask1 == false) {
+      wx.showModal({
+        showCancel: false,
+        content: "请按照任务顺序执行哦!"
+      })
+      return false
+    }
     console.log(e.currentTarget.dataset.item, "8888")
     console.log(e.currentTarget.dataset.item, "8888")
     let isStudyDone = e.currentTarget.dataset.item.isStudyDone
     let isStudyDone = e.currentTarget.dataset.item.isStudyDone
     let isFeedback = e.currentTarget.dataset.item.isFeedback
     let isFeedback = e.currentTarget.dataset.item.isFeedback
@@ -148,7 +166,7 @@ Page({
           data: {
           data: {
             sessionKey: this.data.sessionKey,
             sessionKey: this.data.sessionKey,
             questSub: '3',
             questSub: '3',
-            courseId: e.currentTarget.dataset.courseid,
+            courseId: e.currentTarget.dataset.id,
             clasId: this.data.classInfo.id
             clasId: this.data.classInfo.id
           },
           },
           success: (res) => {
           success: (res) => {
@@ -273,11 +291,18 @@ Page({
     });
     });
   },
   },
   // 期末考试
   // 期末考试
-  goQmks() {
-    this.getgoQmks();
-  },
+  // goQmks() {
+  //   this.getgoQmks();
+  // },
   // 期末考试接口 、、、、、、
   // 期末考试接口 、、、、、、
-  getgoQmks() {
+  goQmks() {
+    if (this.data.istask2 == false) {
+      wx.showModal({
+        showCancel: false,
+        content: "请按照任务顺序执行哦!"
+      })
+      return false
+    }
     console.log(this.data.sessionKey);
     console.log(this.data.sessionKey);
     console.log(this.data.classInfo.id);
     console.log(this.data.classInfo.id);
     wx.request({
     wx.request({
@@ -309,53 +334,22 @@ Page({
       }
       }
     })
     })
   },
   },
-  // 学员登记表的
-  // goWrite() {
-  //   // wx.showModal({
-  //   //   showCancel: false,
-  //   //   content: "敬请期待",
-  //   //   success(res) {}
-  //   // })
-  //   //this.getBanner();
-  //   wx.navigateTo({
-  //     url: '../studentRegistration/studentRegistration'
-  //   })
-  // },
   // 学员登记表 、、、、、、
   // 学员登记表 、、、、、、
   goWrite() {
   goWrite() {
     console.log(this.data.sessionKey);
     console.log(this.data.sessionKey);
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/exam/quesExamList',
-      method: "post",
-      data: {
-        sessionKey: this.data.sessionKey,
-        questSub: '0'
-      },
-      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) {
-                wx.navigateTo({
-                  url: '/pages/studentRegistrationDeyail/studentRegistrationDeyail?answersId=' + res.data.list[0].answersId,
-                })
-              } else {
-                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'studentRegistration');
-              }
-            } else {
-              console.log('777777');
-              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'studentRegistration');
-            }
-          }
-        }
-      }
+    wx.navigateTo({
+      url: '../studentRegistration/studentRegistration'
     })
     })
   },
   },
   // 综合反馈表 、、、、、、
   // 综合反馈表 、、、、、、
   goWrite2() {
   goWrite2() {
+    if (this.data.istask3 == false) {
+      wx.showModal({
+        showCancel: false,
+        content: "请按照任务顺序执行哦!"
+      })
+      return false
+    }
     console.log(this.data.sessionKey, "dayin");
     console.log(this.data.sessionKey, "dayin");
     console.log(this.data.classInfo.id);
     console.log(this.data.classInfo.id);
     wx.request({
     wx.request({
@@ -428,6 +422,13 @@ Page({
   // },
   // },
   // 跳转直播点播页面
   // 跳转直播点播页面
   goStudy(e) {
   goStudy(e) {
+    if (this.data.istask1 == false) {
+      wx.showModal({
+        showCancel: false,
+        content: "请按照任务顺序执行哦!"
+      })
+      return false
+    }
     let id = e.currentTarget.dataset.item.id //此课程的id
     let id = e.currentTarget.dataset.item.id //此课程的id
     console.log(id)
     console.log(id)
     console.log(this.data.IngCourseArr, "我是筛选的列表")
     console.log(this.data.IngCourseArr, "我是筛选的列表")
@@ -578,7 +579,8 @@ Page({
       success: (res) => {
       success: (res) => {
         console.log(res, "kckckc")
         console.log(res, "kckckc")
         this.setData({
         this.setData({
-          kcArr: res.data.list
+          kcArr: res.data.list,
+          istask3: res.data.allDone
         });
         });
         for (let i = 0; i < res.data.list.length; i++) {
         for (let i = 0; i < res.data.list.length; i++) {
           if (res.data.list[i].isStudyDone == 0) {
           if (res.data.list[i].isStudyDone == 0) {
@@ -630,10 +632,62 @@ Page({
     const hoursValue = hours % 60; //小时
     const hoursValue = hours % 60; //小时
     return `${hoursValue}时${minutesValue}分${secondValue}秒`;
     return `${hoursValue}时${minutesValue}分${secondValue}秒`;
   },
   },
+  // 学员登记任务check
+  checkTaskList1(sessionKey) {
+    wx.request({
+      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.data.register == 0) {
+          this.setData({
+            istask1: true
+          })
+        }
+      }
+    })
+  },
+  checkTaskList3(sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/clasExamstatus',
+      method: "post",
+      data: {
+        sessionKey: sessionKey
+      },
+      success: (res) => {
+        console.log(res.data, "我是第三个任务的检查状态")
+        if (res.data.code == 0 && res.data.status == 0) {
+          this.setData({
+            istask3: true
+          })
+        }
+      }
+    })
+  },
+  // 综合反馈任务check
+  checkTaskList4(sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/status',
+      method: "post",
+      data: {
+        sessionKey: sessionKey
+      },
+      success: (res) => {
+        console.log(res.data, "我是第四个任务的检查状态")
+        if (res.data.code == 0 && res.data.status == 0) {
+          this.setData({
+            istask4: true
+          })
+        }
+      }
+    })
+  },
   async onShow() {
   async onShow() {
     const sessionKey = await tools.checkSessionAndLogin();
     const sessionKey = await tools.checkSessionAndLogin();
     console.log(sessionKey, "000000");
     console.log(sessionKey, "000000");
-
     //const sessionKey = 'BqQROCKCxn7R2NXdQLud9Q==';
     //const sessionKey = 'BqQROCKCxn7R2NXdQLud9Q==';
     this.setData({
     this.setData({
       sessionKey: sessionKey
       sessionKey: sessionKey
@@ -641,5 +695,8 @@ Page({
     this.isClass(sessionKey);
     this.isClass(sessionKey);
     this.getMycourse(sessionKey);
     this.getMycourse(sessionKey);
     this.getMynotice(sessionKey);
     this.getMynotice(sessionKey);
+    this.checkTaskList1(sessionKey)
+    this.checkTaskList3(sessionKey)
+    this.checkTaskList4(sessionKey)
   }
   }
 })
 })

+ 33 - 30
pages/myMission/myMission.js

@@ -185,37 +185,40 @@ Page({
       })
       })
       return false
       return false
     }
     }
-    console.log(this.data.sessionKey, "dayin");
-    console.log(this.data.classInfo.id);
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/exam/quesExamList',
-      method: "post",
-      data: {
-        sessionKey: this.data.sessionKey,
-        questSub: '1',
-        clasId: this.data.classInfo.id
-      },
-      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) {
-              if (res.data.list[0].status == '1') {
-                wx.navigateTo({
-                  url: '/pages/feedBackDetail/feedBackDetail?answersId=' + res.data.list[0].answersId,
-                })
-              } else {
-                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'feedBack');
-              }
-            } else {
-              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'feedBack');
-            }
-          }
-        }
-      }
+    wx.navigateTo({
+      url: '../studentRegistration/studentRegistration'
     })
     })
+    // console.log(this.data.sessionKey, "dayin");
+    // console.log(this.data.classInfo.id);
+    // wx.request({
+    //   url: app.globalData.publicUrl + '/wx/exam/quesExamList',
+    //   method: "post",
+    //   data: {
+    //     sessionKey: this.data.sessionKey,
+    //     questSub: '1',
+    //     clasId: this.data.classInfo.id
+    //   },
+    //   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) {
+    //           if (res.data.list[0].status == '1') {
+    //             wx.navigateTo({
+    //               url: '/pages/feedBackDetail/feedBackDetail?answersId=' + res.data.list[0].answersId,
+    //             })
+    //           } else {
+    //             this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'feedBack');
+    //           }
+    //         } else {
+    //           this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'feedBack');
+    //         }
+    //       }
+    //     }
+    //   }
+    // })
   },
   },
   toPath(id, paperId, answersId, address, status) {
   toPath(id, paperId, answersId, address, status) {
     wx.navigateTo({
     wx.navigateTo({

+ 1 - 1
pages/studentRegistration/studentRegistration.wxml

@@ -107,7 +107,7 @@
 				</view>
 				</view>
 				<view class="xingbie">任职时间</view>
 				<view class="xingbie">任职时间</view>
 				<view class='weui-input' style="font-size: 26rpx;  line-height: 56rpx;"  catchtap="share1">
 				<view class='weui-input' style="font-size: 26rpx;  line-height: 56rpx;"  catchtap="share1">
-					{{tenure}}
+					{{tenure == null ? '':tenure  }}
 					<view  wx:if='{{!tenure}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx" >{{headmasterText}}</view>
 					<view  wx:if='{{!tenure}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx" >{{headmasterText}}</view>
 					<!-- <view class="{{renzhishijianIsTrue?'error':'noerror'}}">请输入任职时间</view> -->
 					<!-- <view class="{{renzhishijianIsTrue?'error':'noerror'}}">请输入任职时间</view> -->
 				</view>
 				</view>

+ 2 - 2
utils/util.js

@@ -1,7 +1,7 @@
 const globalData = {
 const globalData = {
   // 正式服务器
   // 正式服务器
   publicUrl: 'https://sqdx.jiaxintech.com',
   publicUrl: 'https://sqdx.jiaxintech.com',
-  // publicUrl: 'http://10.16.4.19:80',
+  // publicUrl: 'http://10.16.10.139', 
   publicSocketUrl: 'wss://sqdx.jiaxintech.com'
   publicSocketUrl: 'wss://sqdx.jiaxintech.com'
   // 测试服务器
   // 测试服务器
   // publicUrl: 'https://sqdx.windd.cn',
   // publicUrl: 'https://sqdx.windd.cn',
@@ -13,7 +13,7 @@ const globalData = {
   // publicUrl: 'http://10.16.10.139', 
   // publicUrl: 'http://10.16.10.139', 
   // publicSocketUrl: 'ws://10.16.10.139'
   // publicSocketUrl: 'ws://10.16.10.139'
   //zxq
   //zxq
-  //publicUrl: 'http://10.16.4.26:8080', 
+  //publicUrl: 'http://10.16.4.26:8090', 
 };
 };
 module.exports = {
 module.exports = {
   globalData: globalData,
   globalData: globalData,