ssfg 5 tahun lalu
induk
melakukan
ff8aeac86f

+ 6 - 11
pages/answerAfterclass/answerAfterclass.js

@@ -331,6 +331,10 @@ Page({
   },
   submitAll(currentAnswerTemp) {
     console.log();
+    wx.showLoading({
+      mask: true,
+      title: '加载中',
+    })
     wx.request({
       url: app.globalData.publicUrl + '/wx/paper/commit',
       method: "post",
@@ -341,6 +345,7 @@ Page({
       },
       success: (res) => {
         console.log(res);
+        wx.hideLoading();
         if (res.data.msg == '请勿重复提交') {
           wx.showModal({
             showCancel: false,
@@ -349,11 +354,6 @@ Page({
           })
         } 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: '恭喜您,提交答案成功,请耐心等待老师判卷',
@@ -362,17 +362,12 @@ Page({
                   delta: 1
                 })
               }
-            })
-            
+            }) 
             // wx.switchTab({
             //   url: '/pages/myClass/myClass',
             // })
-
-           
           }
         }
-
-
       }
     })
   }

+ 5 - 0
pages/evaluationCourse/evaluationCourse.js

@@ -404,6 +404,10 @@ Page({
   //   }
   // },
   submitForm() {
+    wx.showLoading({
+      mask: true,
+      title: '加载中',
+    })
     console.log(this.data.chooseValue, "打印下提交");
     wx.request({
       url: app.globalData.publicUrl + '/wx/paper/commit',
@@ -414,6 +418,7 @@ Page({
         answersId: wx.getStorageSync('answersId')
       },
       success: (res) => {
+        wx.hideLoading();
         console.log(res);
         if(res.data.msg == "请勿重复提交"){
           wx.showModal({

+ 0 - 2
pages/exhibitionList/exhibitionList.wxml

@@ -7,7 +7,6 @@
 					<view class="grayblock">
 						<view class="show_text">{{item.courseName}}</view>
 						<view class="viedoxx">
-
 							<!-- <view style="color:#e82315;font-size:25rpx;font-weight:500;float:left">理论阵地</view> -->
 							<view style="color:#848585;font-size:22rpx;float:right;margin-right:20rpx">
 								<image src='/images/qb.png' mode='aspectFill' class="qb"></image>{{item.playTimes}}人看过
@@ -41,7 +40,6 @@
 					<view class="grayblock">
 						<view class="show_text">{{item.courseName}}</view>
 						<view class="viedoxx">
-
 							<!-- <view style="color:#e82315;font-size:25rpx;font-weight:500;float:left">特色课程</view> -->
 							<view style="color:#848585;font-size:22rpx;float:right;margin-right:20rpx">
 								<image src='/images/qb.png' mode='aspectFill' class="qb"></image>{{item.playTimes}}人看过

+ 1 - 3
pages/lastdetail/lastdetail.js

@@ -409,8 +409,7 @@ Page({
         if (res.data.msg == "请勿重复提交") {
           wx.showModal({
             showCancel: false,
-            content: res.data.msg,
-            success(res) {}
+            content: res.data.msg
           })
         } else {
           wx.showModal({
@@ -422,7 +421,6 @@ Page({
               })
             }
           })
-
         }
 
       }

+ 125 - 11
pages/myClass/myClass.js

@@ -15,6 +15,7 @@ Page({
     myCanvasId: 0, //画布id
     byzsbj: "../../images/zsbj.jpg", //结业证背景  用于合成图片
     IngCourseArr: [], //如果有正在进行的课就存一下
+    istask: false, //判断班级群是否添加
     istask1: false, //学员登记表是否完成
     istask2: false, //课程是否完成
     istask3: false, //期末考试是否完成
@@ -36,6 +37,7 @@ Page({
             classInfo: res.data.data
           })
           this.checkTaskList4(sessionKey, res.data.data.id);
+          this.checkTaskList(sessionKey);
           this.checkTaskList3(sessionKey, res.data.data.id);
           this.isAgree(sessionKey);
         } else {
@@ -135,6 +137,29 @@ Page({
       }
     })
   },
+  // 检查班级群是否加了
+  checkTaskList(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) {
+          if (res.data.data.joinClas == 0) {
+            this.setData({
+              istask: true
+            })
+          }
+          this.setData({
+            studentName: res.data.data.studentName,
+          })
+        }
+      }
+    })
+  },
   // 学员登记任务check
   checkTaskList1(sessionKey) {
     wx.request({
@@ -224,7 +249,20 @@ Page({
   },
   // 学员登记表
   goWrite() {
-    console.log(this.data.sessionKey);
+    if (!this.data.istask) {
+      wx.showModal({
+        showCancel: false,
+        content: "请先去扫描二维码加入班级群吧",
+        success(res) {
+          if (res.confirm) {
+            wx.switchTab({
+              url: '../myMission/myMission'
+            })
+          }
+        }
+      })
+      return false
+    }
     wx.navigateTo({
       url: '../studentRegistration/studentRegistration'
     })
@@ -242,7 +280,7 @@ Page({
         console.log(res, "11111111111111111111111111111111")
         this.setData({
           kcArr: res.data.list,
-          istask3: res.data.allDone
+          istask2: res.data.allDone
         });
         for (let i = 0; i < res.data.list.length; i++) {
           if (res.data.list[i].isStudyDone == 0) {
@@ -303,16 +341,28 @@ Page({
   },
   // 去学习
   goStudy(e) {
-    if (this.data.istask1 == false) {
+    if (!this.data.istask1) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"
       })
       return false
     }
+    if (!this.data.istask) {
+      wx.showModal({
+        showCancel: false,
+        content: "请先去扫描二维码加入班级群吧",
+        success(res) {
+          if (res.confirm) {
+            wx.switchTab({
+              url: '../myMission/myMission'
+            })
+          }
+        }
+      })
+      return false
+    }
     let id = e.currentTarget.dataset.item.id //此课程的id
-    console.log(id)
-    console.log(this.data.IngCourseArr, "我是筛选的列表")
     if (this.data.IngCourseArr.length == 0) {
       if (e.currentTarget.dataset.item.isLive == 1) {
         if (e.currentTarget.dataset.item.isActive == 1) {
@@ -360,7 +410,21 @@ Page({
   },
   // 去考试
   gokhAnswer(e) {
-    if (this.data.istask1 == false) {
+    if (!this.data.istask) {
+      wx.showModal({
+        showCancel: false,
+        content: "请先去扫描二维码加入班级群吧",
+        success(res) {
+          if (res.confirm) {
+            wx.switchTab({
+              url: '../myMission/myMission'
+            })
+          }
+        }
+      })
+      return false
+    }
+    if (!this.data.istask1) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"
@@ -406,7 +470,21 @@ Page({
   },
   //去评价
   gopjClass(e) {
-    if (this.data.istask1 == false) {
+    if (!this.data.istask) {
+      wx.showModal({
+        showCancel: false,
+        content: "请先去扫描二维码加入班级群吧",
+        success(res) {
+          if (res.confirm) {
+            wx.switchTab({
+              url: '../myMission/myMission'
+            })
+          }
+        }
+      })
+      return false
+    }
+    if (!this.data.istask1) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"
@@ -488,7 +566,21 @@ Page({
   },
   // 期末考试
   goQmks() {
-    if (this.data.istask2 == false) {
+    if (!this.data.istask) {
+      wx.showModal({
+        showCancel: false,
+        content: "请先去扫描二维码加入班级群吧",
+        success(res) {
+          if (res.confirm) {
+            wx.switchTab({
+              url: '../myMission/myMission'
+            })
+          }
+        }
+      })
+      return false
+    }
+    if (!this.data.istask2) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"
@@ -503,6 +595,7 @@ Page({
         clasId: this.data.classInfo.id
       },
       success: (res) => {
+        console.log(res, "000000")
         if (res.data.code == 0) {
           if (res.data.list.length == 0) {
             wx.showModal({
@@ -546,10 +639,17 @@ Page({
   },
   // 综合反馈表
   goWrite2() {
-    if (this.data.istask3 == false) {
+    if (!this.data.istask) {
       wx.showModal({
         showCancel: false,
-        content: "请按照任务顺序执行哦!"
+        content: "请先去扫描二维码加入班级群吧",
+        success(res) {
+          if (res.confirm) {
+            wx.switchTab({
+              url: '../myMission/myMission'
+            })
+          }
+        }
       })
       return false
     }
@@ -618,7 +718,21 @@ Page({
   },
   // 领取结业证
   lq() {
-    if (this.data.istask4 == false) {
+    if (!this.data.istask) {
+      wx.showModal({
+        showCancel: false,
+        content: "请先去扫描二维码加入班级群吧",
+        success(res) {
+          if (res.confirm) {
+            wx.switchTab({
+              url: '../myMission/myMission'
+            })
+          }
+        }
+      })
+      return false
+    }
+    if (!this.data.istask3) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"

+ 4 - 7
pages/myClass/myClass.wxml

@@ -23,12 +23,12 @@
 	<view class="layout" bindtap="goWrite">
 		<image src='/images/xydj_bj.png' mode='aspectFill' class="bgimg1"></image>
 		<view class="layout_text1">学员登记表</view>
-		<view class="layout_text2" wx:if='{{istask1}}'>查看详情</view>  
+		<view class="layout_text2" wx:if='{{istask1}}'>查看详情</view>
 		<view class="layout_text2" wx:else>去填写</view>
 	</view>
 	<view class="{{!showMore? 'hiddenmore' : 'showmore'}}">
 		<view class="sp {{idx>2 ? 'none' : ''}}" wx:for="{{kcArr}}" wx:for-index="idx" wx:for-item="item">
-			<image src='{{item.courseImg}}' mode="widthFix" class="spfm"></image>
+			<image src='{{item.courseImg}}' mode="aspectFill" class="spfm"></image>
 			<image src='{{item.isDone==0||item.isDone==null?"/images/unfinish.png":"/images/finish.png"}}' mode='aspectFill' class="isfinish"></image>
 			<view class="sp_text">
 				<view class="fisrt_set">
@@ -44,11 +44,9 @@
 					<view class="start_text" wx:if='{{item.isLive==-1}}'>视频时长: {{sfmArr[idx].courseTime}}</view> -->
 				<view>
 					<image src='/images/startstudy.png' mode='aspectFill' class="an" data-item="{{item}}" bindtap="goStudy"></image>
-
 					<image src='/images/dtxs.png' wx:if='{{item.isExam==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gokhAnswer"></image>
-					<image src='/images/pjkc.png' wx:if='{{item.isFeedback==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gopjClass"></image>
-
 					<image src='/images/ckcj.png' wx:if='{{item.isExam==1}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gockcj"></image>
+					<image src='/images/pjkc.png' wx:if='{{item.isFeedback==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gopjClass"></image>
 					<image src='/images/ckpj.png' wx:if='{{item.isFeedback==1}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gockpj"></image>
 
 				</view>
@@ -72,9 +70,8 @@
 	<view class="layout" style="margin-top:40rpx" bindtap="goWrite2">
 		<image src='/images/zhfk_bj.png' mode='aspectFill' class="bgimg1"></image>
 		<view class="layout_text1">综合反馈表</view>
-
 		<view class="layout_text2" wx:if='{{istask4}}'>查看详情</view>
-		<view class="layout_text2" wx:else>去填写</view>  
+		<view class="layout_text2" wx:else>去填写</view>
 	</view>
 	<view class="qy_title" bindtap="goMyPoints">
 		<view class="redk"></view>我的积分:80积分

+ 17 - 12
pages/myMission/myMission.js

@@ -45,6 +45,7 @@ Page({
   saveImg() {
     wx.getSetting({
       success: (res) => {
+        console.log(res)
         if (!res.authSetting['scope.writePhotosAlbum']) {
           wx.authorize({
             scope: 'scope.writePhotosAlbum',
@@ -53,7 +54,7 @@ Page({
               wx.showLoading({
                 title: '保存中...'
               })
-              let imgSrc = this.data.ewmurl;
+              let imgSrc = this.data.classInfo.codeImg;
               wx.downloadFile({
                 url: imgSrc,
                 success: function (res) {
@@ -96,7 +97,11 @@ Page({
             }
           })
         } else {
-          let imgSrc = this.data.ewmurl
+          wx.showLoading({
+            title: '保存中...'
+          })
+          console.log(this.data.classInfo.codeImg)
+          let imgSrc = this.data.classInfo.codeImg
           wx.downloadFile({
             url: imgSrc,
             success: function (res) {
@@ -545,15 +550,15 @@ Page({
   },
   // 综合反馈表
   goWrite2() {
-    if (this.data.istask4 == false) {
-      wx.showModal({
-        showCancel: false,
-        content: "请按照任务顺序执行哦!"
-      })
-      return false
-    }
-    console.log(this.data.sessionKey, "dayin");
-    console.log(this.data.classInfo.id);
+    // if (this.data.istask4 == 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",
@@ -620,7 +625,7 @@ Page({
   },
   // 领取结业证
   lq() {
-    if (this.data.istask5 == false) {
+    if (this.data.istask4 == false) {
       wx.showModal({
         showCancel: false,
         content: "请按照任务顺序执行哦!"

+ 1 - 1
pages/myMission/myMission.wxml

@@ -44,8 +44,8 @@
 					<view class="name">{{item.courseName}}</view>
 					<image src='/images/startstudy.png' mode='aspectFill' class="an" data-item="{{item}}" bindtap="goStudy"></image>
 					<image src='/images/dtxs.png' wx:if='{{item.isExam==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gokhAnswer"></image>
-					<image src='/images/pjkc.png' wx:if='{{item.isFeedback==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gopjClass"></image>
 					<image src='/images/ckcj.png' wx:if='{{item.isExam==1}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gockcj"></image>
+					<image src='/images/pjkc.png' wx:if='{{item.isFeedback==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gopjClass"></image>
 					<image src='/images/ckpj.png' wx:if='{{item.isFeedback==1}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gockpj"></image>
 				</view>
 			</view>

+ 2 - 2
pages/studentRegistration/studentRegistration.js

@@ -24,13 +24,13 @@ Page({
     parameter: [{
       id: 1,
       name: '男',
-      value: '1',
+      value: '0',
       checked: false
     }, {
       id: 2,
       name: '女',
       checked: false,
-      value: '0',
+      value: '1',
     }],
     renzhiDate: '',
     postshow: false,