Kaynağa Gözat

置灰考试和模考

xuqiaoying 3 yıl önce
ebeveyn
işleme
9a42fe711b

+ 2 - 1
common/httpList/apply.js

@@ -5,7 +5,8 @@ export default {
 	//新增用户预约考试
 	addApply(data) {
 		return myRequest({
-			url: '/apply',
+			// url: '/apply',
+			url: '/apply/save',
 			method: 'post',
 			data: data
 		})

+ 1 - 1
common/request.js

@@ -6,7 +6,7 @@ var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+// export const BASE_URL = 'http://120.79.166.s78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地

+ 10 - 14
components/course/courseSection.vue

@@ -146,11 +146,11 @@ export default {
 	mounted() {
 		this.nowTime = Number(new  Date().getTime()/1000).toFixed(0)
 		this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
-		console.log(this.newId,'this.newId', this.playNextId)
-		console.log(this.playSectionId,'this.playSectionId')
-		console.log(this.isRebuild)
-		console.log(this.nextMenuItem,'nextMenuItem')
-		console.log(this.menuItem,'this.menuItem=======>',this.menuItem.recordingUrl, this.nowTime)
+		// console.log(this.newId,'this.newId', this.playNextId)
+		// console.log(this.playSectionId,'this.playSectionId')
+		// console.log(this.isRebuild)
+		// console.log(this.nextMenuItem,'nextMenuItem')
+		// console.log(this.menuItem,'this.menuItem=======>',this.menuItem.recordingUrl, this.nowTime)
 		let moduleId = this.menuItem.moduleId || 0;
 		let chapterId = this.menuItem.chapterId || 0;
 		let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
@@ -169,7 +169,6 @@ export default {
 				    content: '是否播放下一节',
 				    success: function (res) {
 				        if (res.confirm) {
-				            console.log('用户点击确定');
 							let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
 							//设置播放的节ID
 							self.$store.commit('setPlaySectionId', {playSectionId  :nextId});
@@ -203,7 +202,7 @@ export default {
 	},
 	methods: {
 		isLast() {
-			console.log(this.liveLast,'this.liveLast')
+			// console.log(this.liveLast,'this.liveLast')
 			if(this.liveLast) {
 				let sectionASame = this.liveLast.sectionId == (this.menuItem.sectionId || this.menuItem.menuId)
 				let chapterSame = this.liveLast.chapterId == (this.menuItem.chapterId || 0)
@@ -278,7 +277,6 @@ export default {
 							
 						}
 					}
-					console.log(newRows)
 					let isAllLearn = newRows.every(item => {
 						return item.studyStatus == 1;
 					})
@@ -361,7 +359,7 @@ export default {
 			});
 		},
 		async playVideo() {
-			console.log('直播的课程:',this.menuItem,this.menuItem.recordingUrl)
+			// console.log('直播的课程:',this.menuItem,this.menuItem.recordingUrl)
 			if(this.menuItem.sectionType==1 || this.menuItem.sectionType == 3){
 				//1录播 3回放
 				if(!this.isBuy){
@@ -374,7 +372,6 @@ export default {
 						this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
 						this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
 						this.menuItem.courseId = this.courseId;
-						console.log('-----getSection-')
 						uni.$emit('getSection', this.menuItem)
 						return;
 					}
@@ -384,8 +381,8 @@ export default {
 				let learnNum = await this.goodsTodayStudySectionNum()
 				let hasLearn = await this.gradeCheckGoodsStudy();
 				
-				console.log(this.sectionMaxNum,'this.sectionMaxNum')
-				console.log(learnNum,'learnNum')
+				// console.log(this.sectionMaxNum,'this.sectionMaxNum')
+				// console.log(learnNum,'learnNum')
 				if(this.sectionMaxNum > 0) {
 					if(learnNum >= this.sectionMaxNum && !hasLearn) {
 						uni.showToast({
@@ -436,13 +433,12 @@ export default {
 				uni.$emit('levelId', this.levelId)
 				uni.$emit('getSection', this.menuItem)
 				uni.$emit('isRebuild',this.isRebuild)
-				console.log(this.menuItem,'menuItem')
+				// console.log(this.menuItem,'menuItem')
 				// uni.$off('playend')
 				// uni.$on('playend',res => {
 				// 	console.log('playend2')
 				// 	this.$emit('playEnd',{isRebuild:this.isRebuild})
 				// })
-				console.log(999)
 			}
 			if(this.menuItem.sectionType==2){
 				//直播

+ 11 - 0
pages.json

@@ -235,6 +235,17 @@
 					}
 				}
 			},
+			{
+				"path": "exam/signCommit",
+				"style": {
+					"navigationBarTitleText": "签署承诺书",
+					"navigationStyle": "custom", // 隐藏系统导航栏
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
+			},
 			{
 				"path": "exam/exam_result",
 				"style": {

+ 1 - 1
pages/learn/index.vue

@@ -1031,7 +1031,7 @@ export default {
 			this.appoint_an(item, appoint_item)
 		},
 		appoint_an(item, appoint) {
-			console.log('==appoint=', appoint)
+			// console.log('==appoint=', appoint)
 			var data = {
 				goodsId: item.goodsId,
 				gradeId: item.gradeId,

+ 2 - 1
pages/wd/index.vue

@@ -85,7 +85,8 @@
 						个模考预约
 					</view>
 				</navigator>
-				<navigator  hover-class="none" url="/pages2/exam/index" class="menu_box" >
+				<!--    /pages2/exam/index-->
+				<navigator  hover-class="none" url="/pages2/exam/exam_appointment" class="menu_box" >
 					<view class="box_left">
 						<image src="/static/icon/my_icon10.png" class="my_icon"></image>
 						<view>我的考试</view>

+ 179 - 2
pages2/appointment/order.vue

@@ -61,6 +61,51 @@
 					</text> -->
         </view>
       </view>
+      <!-- 考试疫情承诺书 -->
+      <view class="appointmentItem">
+        <view class="title"><text class="star_red">*</text> 考试疫情承诺书</view>
+        <view class="commitment">
+          本人参加“住房和城乡建设领域施工现场专业人员岗位”考试,愿意遵守疫情防控各项管理的相关要求,秉承对自己、对他人负责的原则,承担疫情防控社会责任,郑重作出以下承诺:<br/>
+          一、充分理解并遵守考试期间考点各项防疫安全的要求。<br/>
+          二、在考试前14天内,没有到过国内疫情中风险、高风险地区,未出境,不存在自境外回国情形。<br/>
+          三、在考试前14天内,每日自觉监测体温,体温均未出现高于37.3度的情形,无发热和呼吸道门诊就诊史。<br/>
+          四、在考试前14天内,未和新冠肺炎病例或疑似病例密切接触或间接接触,没有发烧、干咳、乏力、咳痰、气短、肌肉痛或关节痛、咽喉痛、头痛、寒颤、恶心或呕吐、鼻塞、腹泻、咳血、结膜充血等疑似新冠肺炎症状。<br/>
+          五、如出现与前述第二、三、四项任何一项不符的情形之一的,本人将及时在考前向相关管理机构报告,自觉配合采取隔离或其他防疫措施,并根据情况,自愿放弃参加考试。<br/>
+          六、考试当日自行做好防护工作,佩戴防护口罩。提前抵达考点,配合查验健康码、测量体温等。<br/>
+          七、考试期间,将严格遵守应考人员考场守则及疫情防控相关管理要求,完成考试后立即离场,不扎堆,不聚集。<br/>
+          八、本人承诺遵守《应考人员安全承诺书》中所有承诺内容,若因有瞒报、谎报造成新冠肺炎疫情传播的,一经查实,由本人承担相应的法律和经济责任。
+        </view>
+      </view>
+      <view class="appointmentItem">
+        <view class="title"><text class="star_red">*</text>签名板</view>
+        <view class="dis_stys">
+          <text style="color: #999999">请在下方签名区进行签名</text>
+          <text @click="retDraw" mode="">清空</text>
+        </view>
+        <view class="handCenter">
+           <!-- v-if="!form[item.fieldKey]" -->
+          <canvas
+            class="handWriting"
+            disable-scroll="true"
+            :catchtouchmove="true"
+            @touchstart="uploadScaleStart"
+            @touchmove="uploadScaleMove"
+            @touchend="uploadScaleEnd"
+            canvas-id="handWriting"
+          ></canvas>
+          <!-- <view
+            v-else
+            style="width: 100%; height: 100%; position: relative"
+          >
+            <view class="ctoples">图片</view>
+            <image
+              style="width: 100%; height: 100%"
+              :src="$method.splitImgHost(form[item.fieldKey])"
+              mode=""
+            ></image>
+          </view> -->
+        </view>
+      </view>
       <view class="btnMain">
         <view class="return" @click="backPage">上一步</view>
         <view class="sure" @click="sureOppoint">{{
@@ -100,6 +145,7 @@
 
 <script>
 import { mapGetters } from "vuex";
+import Handwriting from "@/common/signature.js";
 export default {
   data() {
     return {
@@ -114,6 +160,12 @@ export default {
       applyStatus: null, //学员状态ID
       sysTime: 0,
       dataId: null, //跳转拷贝
+      handwriting: '',
+      lineColor: "black",
+      slideValue: 50,
+      openVerify: false, // 控制是否手动验证
+      commitment_electr_signature: '',
+      isUploading: false,
     };
   },
   async onLoad(option) {
@@ -125,6 +177,14 @@ export default {
     await this.commonSystemTime();
     this.getInfo();
   },
+  onReady(res) {
+    this.handwriting = new Handwriting({
+      lineColor: this.lineColor,
+      slideValue: this.slideValue, // 0, 25, 50, 75, 100
+      canvasName: "handWriting",
+    });
+    // this.$refs.uForm.setRules(this.rules);
+  },
   methods: {
     commonSystemTime() {
       return new Promise((resolve) => {
@@ -145,6 +205,7 @@ export default {
               item.checked = false;
             });
             this.listData = res.data.data;
+            console.log('this.listData:', this.listData)
           }
         });
     },
@@ -217,7 +278,7 @@ export default {
         }
       });
 
-      console.log(this.activeList);
+      console.log('----',this.activeList);
       this.address_show = false;
     },
     choItem(index) {
@@ -232,13 +293,32 @@ export default {
         }
       });
     },
-    sureOppoint() {
+    async sureOppoint() {
+      if (this.isUploading) {
+        return;
+      }
+      this.isUploading = true
+      console.log('commitment_electr_signature', this.commitment_electr_signature)
       var self = this;
       if (self.addressId) {
         var ast = self.activeList.some((item) => {
           return item.checked === true;
         });
+        console.log('ast', ast)
         if (ast) {
+          await this.subCanvas()
+          if (!this.commitment_electr_signature) {
+            uni.showToast({
+              title: "请签名",
+              icon: "none",
+            })
+            return
+          } else {
+            await this.submitApi()
+          }
+          
+          console.log('this.00000', this.commitment_electr_signature)
+          // return
           var copyData = JSON.parse(JSON.stringify(self.activeList));
           const index = copyData.findIndex((item) => item.checked);
           var data = {
@@ -250,7 +330,10 @@ export default {
             applySiteStartTime: copyData[index].startTimeC,
             applySiteEndTime: copyData[index].endTimeC,
             orderGoodsId: self.orderGoodsId,
+            reportFile: this.commitment_electr_signature,
           };
+          console.log('-----data', data)
+          // return
           if (self.dataId === 1) {
             self.$store.commit("updateApplyData", data);
             self.$navTo.togo("/pages2/appointment/kporder", {
@@ -274,17 +357,20 @@ export default {
               }
             });
           }
+          this.isUploading = false
         } else {
           uni.showToast({
             title: "请选择考试时间",
             icon: "none",
           });
+          this.isUploading = false
         }
       } else {
         uni.showToast({
           title: "请选择考试地点",
           icon: "none",
         });
+        this.isUploading = false
       }
     },
     backPage() {
@@ -292,6 +378,72 @@ export default {
         delta: 1,
       });
     },
+    retDraw() {
+      this.handwriting.retDraw()
+      this.commitment_electr_signature = ''
+      // this.$set(this.form, "commitment_electr_signature", "");
+      this.openVerify = false;
+    },
+    uploadScaleStart(event) {
+      this.handwriting.uploadScaleStart(event);
+    },
+    uploadScaleMove(event) {
+      this.handwriting.uploadScaleMove(event);
+    },
+    uploadScaleEnd(event) {
+      this.handwriting.uploadScaleEnd(event);
+    },
+    subCanvas() {
+      console.log("签名-------");
+      return new Promise((resolve, reject) => {
+        if (this.commitment_electr_signature) {
+          resolve();
+          return;
+        }
+        this.handwriting.saveCanvas().then((res) => {
+            if (this.handwriting.linePrack.length) {
+              console.log('签名-----res', res)
+              // this.$set(this.form, "commitment_electr_signature", res);
+              this.commitment_electr_signature = res
+            }
+            resolve(res)
+          })
+          .catch((err) => {
+            uni.showToast({
+              title: "签名上传失败",
+              icon: "error",
+            });
+
+          });
+          this.isUploading = false
+      });
+    },
+    // async submits() {
+
+    //   if (this.isUploading) {
+    //     return;
+    //   }
+    //   this.isUploading = true;
+    //   var ast = this.listData.some((item) => {
+    //     return item.fieldKey === "commitment_electr_signature";
+    //   });
+    //   if (ast) {
+    //     await this.subCanvas();
+    //   }
+    //   this.openVerify = true;
+    // },
+     //提交表单
+    async submitApi() {
+      if (this.commitment_electr_signature) {
+        this.commitment_electr_signature = await this.$method.uploadFile(
+          this.commitment_electr_signature,
+          0
+        );
+        console.log('----commitment_electr_signature', this.commitment_electr_signature)
+      }
+
+      // this.uploadDatas(data);
+    },
   },
 };
 </script>
@@ -317,6 +469,9 @@ page {
       line-height: 1;
       margin-bottom: 16rpx;
       padding-left: 24rpx;
+      .star_red {
+        color: red;
+      }
     }
     .place {
       height: 80rpx;
@@ -327,6 +482,28 @@ page {
       align-items: center;
       padding: 0 24rpx;
     }
+    .commitment {
+      padding: 12rpx;
+      height: 300rpx;
+      background: #ffffff;
+      overflow-y: auto;
+    }
+    .handCenter, .dis_stys, .commitment {
+      margin: 0rpx 24rpx;
+    }
+    .dis_stys {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-bottom: 16rpx;
+    }
+    .handCenter {
+      .handWriting {
+        width: 100%;
+        height: 400rpx;
+        background: #fff;
+      }
+    }
   }
   .main {
     background: #ffffff;

+ 55 - 3
pages2/exam/exam_appointment.vue

@@ -40,6 +40,24 @@
 								{{ item.applySiteEndTrainTime }}
 							</view>
 						</view>
+						<view class="item">
+							<view class="left">准考证号</view>
+							<view class="right">
+								{{ item.examineeCode }}
+							</view>
+						</view>
+						<view class="item">
+							<view class="left">座位号</view>
+							<view class="right">
+								{{ item.seatNumber }}
+							</view>
+						</view>
+						<view class="item" @click="toSign(item)">
+							<view class="left">疫情防控承诺书</view>
+							<view class="right" :class="{unSign: item.reportStatus == 0}">
+								{{ item.reportStatus == 1 ? '已签署' : item.reportStatus == 0 ? '未签署' : '' }}
+							</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -63,7 +81,7 @@
 						<text class="val">{{ activeList.studentType == 1 ? '非补考学员' : activeList.studentType == 2 ? '补考学员' : '' }}</text>
 					</view>
 				</view>
-				<view class="boxItem">
+				<view class="boxItem border">
 					<view class="title">考试预约信息</view>
 					<view class="item">
 						考试标题:
@@ -93,6 +111,18 @@
 							}}
 						</text>
 					</view>
+					<view class="item">
+						准考证号:
+						<text class="val">
+							{{ activeList.examineeCode }}
+						</text>
+					</view>
+					<view class="item">
+						座位号:
+						<text class="val">
+							{{ activeList.seatNumber }}
+						</text>
+					</view>
 					<view class="item" v-if="activeList.applySiteAddressTrain">
 						考前培训地点:
 						<text class="val">{{ activeList.applySiteAddressTrain }}</text>
@@ -110,6 +140,17 @@
 						</text>
 					</view>
 				</view>
+				<view class="boxItem border">
+					<view class="title">考试成绩和证书信息</view>
+					<view class="item">
+						考试成绩:
+						<text class="val">{{ activeList.performance || '-' }}分</text>
+					</view>
+					<view class="item">
+						考试结果:
+						<text class="val">{{ activeList.syncExamResult }}</text>
+					</view>
+				</view>
 				<u-line color="#EEEEEE" />
 				<view class="foot" v-if="activeList.subscribeStatus === 1">
 					<view class="btn" @click="hideModel">知道了</view>
@@ -171,7 +212,6 @@ export default {
 		option.current && (this.paramCount = option.current)
 	},
 	onShow() {
-		console.log('111111',this.paramCount)
 		if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
 			return;
 		}
@@ -200,6 +240,13 @@ export default {
 	},
 	methods: {
 		...mapActions(['setSystemTime']),
+		toSign(item) {
+			if (item.reportStatus == 0) {
+				uni.navigateTo({
+					url: 'pages2/exam/signCommit'
+				})
+			}
+		},
 		isShowFun(times) {
 			// var timestamp = parseInt(new Date().getTime() / 1000);
 			var newDataAge = parseInt(new Date(new Date(this.sysTime*1000).toLocaleDateString()).getTime() / 1000);
@@ -300,9 +347,11 @@ export default {
 					exceedExamExpend: 1
 				};
 			}
+			// apply/list
 			this.$api.getApplylist(data).then(res => {
 				if (res.data.code === 200) {
-					this.listData = res.data.rows;
+					// this.listData = res.data.rows;
+					this.listData = [1,2]
 				}
 			});
 		}
@@ -377,6 +426,9 @@ page {
 			font-family: PingFang SC;
 			font-weight: bold;
 		}
+		.unSign {
+			text-decoration: underline;
+		}
 	}
 }
 .detailsBox {

+ 112 - 0
pages2/exam/signCommit.vue

@@ -0,0 +1,112 @@
+<template>
+    <view class="sign_commit">
+        <nav-bar title="签署承诺书"></nav-bar>
+        <!-- 考试疫情承诺书 -->
+      <view class="appointmentItem">
+        <view class="title"><text class="star_red">*</text> 考试疫情承诺书</view>
+        <view class="commitment">
+          本人参加“住房和城乡建设领域施工现场专业人员岗位”考试,愿意遵守疫情防控各项管理的相关要求,秉承对自己、对他人负责的原则,承担疫情防控社会责任,郑重作出以下承诺:<br/>
+          一、充分理解并遵守考试期间考点各项防疫安全的要求。<br/>
+          二、在考试前14天内,没有到过国内疫情中风险、高风险地区,未出境,不存在自境外回国情形。<br/>
+          三、在考试前14天内,每日自觉监测体温,体温均未出现高于37.3度的情形,无发热和呼吸道门诊就诊史。<br/>
+          四、在考试前14天内,未和新冠肺炎病例或疑似病例密切接触或间接接触,没有发烧、干咳、乏力、咳痰、气短、肌肉痛或关节痛、咽喉痛、头痛、寒颤、恶心或呕吐、鼻塞、腹泻、咳血、结膜充血等疑似新冠肺炎症状。<br/>
+          五、如出现与前述第二、三、四项任何一项不符的情形之一的,本人将及时在考前向相关管理机构报告,自觉配合采取隔离或其他防疫措施,并根据情况,自愿放弃参加考试。<br/>
+          六、考试当日自行做好防护工作,佩戴防护口罩。提前抵达考点,配合查验健康码、测量体温等。<br/>
+          七、考试期间,将严格遵守应考人员考场守则及疫情防控相关管理要求,完成考试后立即离场,不扎堆,不聚集。<br/>
+          八、本人承诺遵守《应考人员安全承诺书》中所有承诺内容,若因有瞒报、谎报造成新冠肺炎疫情传播的,一经查实,由本人承担相应的法律和经济责任。
+        </view>
+      </view>
+      <view class="appointmentItem">
+        <view class="title"><text class="star_red">*</text>签名板</view>
+        <view class="dis_stys">
+          <text style="color: #999999">请在下方签名区进行签名</text>
+          <text @click="retDraw" mode="">清空</text>
+        </view>
+        <view class="handCenter">
+           <!-- v-if="!form[item.fieldKey]" -->
+          <canvas
+            class="handWriting"
+            disable-scroll="true"
+            :catchtouchmove="true"
+            @touchstart="uploadScaleStart"
+            @touchmove="uploadScaleMove"
+            @touchend="uploadScaleEnd"
+            canvas-id="handWriting"
+          ></canvas>
+          <!-- <view
+            v-else
+            style="width: 100%; height: 100%; position: relative"
+          >
+            <view class="ctoples">图片</view>
+            <image
+              style="width: 100%; height: 100%"
+              :src="$method.splitImgHost(form[item.fieldKey])"
+              mode=""
+            ></image>
+          </view> -->
+        </view>
+      </view>
+    </view>
+</template>
+
+<script>
+export default {
+    name: 'sign_commit',
+    data() {
+        return {
+
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.sign_commit {
+    .appointmentItem {
+    margin: 24rpx 0 40rpx;
+    .title {
+      font-size: 30rpx;
+      font-family: PingFang SC;
+      font-weight: 500;
+      color: #333333;
+      line-height: 1;
+      margin-bottom: 16rpx;
+      padding-left: 24rpx;
+      .star_red {
+        color: red;
+      }
+    }
+    .place {
+      height: 80rpx;
+      background: #ffffff;
+      border-radius: 16rpx;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      padding: 0 24rpx;
+    }
+    .commitment {
+      padding: 12rpx;
+      height: 300rpx;
+      background: #ffffff;
+      overflow-y: auto;
+    }
+    .handCenter, .dis_stys, .commitment {
+      margin: 0rpx 24rpx;
+    }
+    .dis_stys {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-bottom: 16rpx;
+    }
+    .handCenter {
+      .handWriting {
+        width: 100%;
+        height: 400rpx;
+        background: #fff;
+      }
+    }
+  }
+}
+</style>

+ 1 - 0
pages2/verify/input.vue

@@ -995,6 +995,7 @@ export default {
     },
 
     async uploadDatas(data) {
+      console.log('sfsfg---data', data)
       if (this.form.recent_photos && this.form.idcard_face_photo) {
         uni.downloadFile({
           url: this.$method.splitImgHost(this.form.idcard_face_photo),

+ 25 - 19
pages3/polyv/detail.vue

@@ -835,7 +835,7 @@ export default {
           let playNextId = `moduleId${this.option.moduleId}chapterId${
             this.option.chapterId
           }sectionId${this.option.sectionId}${this.option.isRebuild ? "isRebuild" : ""}`;
-          this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
+          this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
           this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
           this.$store.commit("updatePlayNextId", playNextId);
           
@@ -872,11 +872,11 @@ export default {
         this.photoConfig = false;
         this.photoIndex = 0;
         this.sectionItem = item;
-        this.moduleId = item.moduleId
-        this.chapterId = item.chapterId
+        this.moduleId = item.moduleId || null
+        this.chapterId = item.chapterId || null
         
         this.$store.commit("setPlayChannelId", { playChannelId: 0 });
-        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
+        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
         console.log('清除直播节点胡:', this.moduleId,this.chapterId, this.playSectionId )
         // this.postStudyRecord(0)
         //获取拍照历史
@@ -890,14 +890,14 @@ export default {
         this.chapterId = arr[1];
       });
       uni.$on("getChannel", (item) => {
-        console.log('--->清除录播录播清除录播录播')
+        // console.log('--->清除录播录播清除录播录播')
         //清除录播
           this.hasStart = false;
         this.$store.commit("setPlayVID", { playVID: null });
 
         this.moduleId = item.moduleId
         this.chapterId = item.chapterId
-        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
+        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
         this.getPhotoLastRecord();
         this.playChannel(item);
         this.channelItem = item;
@@ -910,7 +910,6 @@ export default {
     },
     // 原来onUnload里面的内容
     originUnload() {
-      console.log('playSectionId', this.playSectionId)
       if (this.playSectionId > 0 && this.hasStart) {
         //退出提交记录
         console.log('退出提交记录sfhasdoufsou敖德萨所多', this.courseId)
@@ -1166,7 +1165,7 @@ export default {
           this.moduleId = res.data.data.moduleId
           this.chapterId = res.data.data.chapterId
 					if(res.data.data.sectionType == 1) { //录播
-          console.log('录播录播录播')
+          // console.log('录播录播录播')
 					this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
 					this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
 
@@ -1958,18 +1957,26 @@ export default {
       this.getNoteList();
     },
     getRecordLast() {
-      let self = this;
       return new Promise((resolve) => {
         let data = {
           gradeId: this.gradeId || this.gradeId == 0 ? Number(this.gradeId) : null,
           goodsId: this.goodsId || this.goodsId == 0 ? Number(this.goodsId) : null,
-          sectionId: this.playSectionId || this.playSectionId == 0 ? Number(this.playSectionId) : null,
+          sectionId: this.playSectionId || 0,
           courseId: this.courseId || this.courseId == 0 ? Number(this.courseId) : null,
-          chapterId: this.chapterId || this.chapterId == 0 ? parseInt(this.chapterId) : null,
-          moduleId: this.moduleId || this.moduleId == 0 ? parseInt(this.moduleId) : null,
+          chapterId: this.chapterId || 0,
+          moduleId: this.moduleId || 0,
 					orderGoodsId: this.orderGoodsId,
         };
-        self.$api.recordLast(data).then((res) => {
+        // if (this.playSectionId || this.playSectionId == 0) {
+        //   data.sectionId = Number(this.playSectionId)
+        // }
+        // if (this.chapterId || this.chapterId == 0) {
+        //   data.chapterId = parseInt(this.chapterId)
+        // }
+        // if (this.moduleId || this.moduleId == 0) {
+        //   data.moduleId = parseInt(this.moduleId)
+        // }
+        this.$api.recordLast(data).then((res) => {
           resolve(res.data.data);
         });
       });
@@ -1982,7 +1989,7 @@ export default {
         console.log("即将跳到笔记位置1");
         this.$u.toast("即将跳到笔记位置");
         this.$store.commit("setPlaySectionId", {
-          playSectionId: item.sectionId,
+          playSectionId: item.sectionId || item.menuId,
         });
         this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
         this.playNoteVideo(item);
@@ -2184,7 +2191,7 @@ export default {
       let data = {
         fromPlat: 1, //来源平台 1小程序 2网站	
         photo: self.ossAvatarUrl,
-        sectionId: parseInt(sectionId),
+        sectionId: sectionId || 0,
         goodsId: parseInt(self.goodsId),
         courseId: parseInt(self.courseId),
 				orderGoodsId: this.orderGoodsId,
@@ -2192,8 +2199,8 @@ export default {
           PlayDuration > 0 ? PlayDuration : self.studyDuration
         ),
         gradeId: parseInt(self.gradeId),
-        chapterId: parseInt(self.chapterId),
-        moduleId: parseInt(self.moduleId),
+        chapterId: this.chapterId || 0,
+        moduleId: this.moduleId || 0,
         videoCurrentTime: parseInt(
           currentTime > 0 ? currentTime : self.studyDuration
         ),
@@ -2201,8 +2208,7 @@ export default {
       if (status > 0) {
         data.status = status;
       }
-      console.log("提交接口", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
-      // return
+      console.log("提交接口:", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
       this.$api.studyRecord(data).then((res) => {
         console.log('提交接口的结果:', res)
         if (res.data.code == 200) {

+ 5 - 0
pages5/examBank/index.vue

@@ -1330,6 +1330,7 @@ export default {
      * 立即交卷
      */
     submitNow() {
+      console.log('sds')
       this.showpopups = false;
       this.needBack = false;
       this.submit();
@@ -1687,6 +1688,7 @@ export default {
      * @param {Object} e单选点击
      */
     radioSelect(optionsId, bindex) {
+      console.log('222', this.questionList)
       if (this.questionList[bindex].ques) return;
       this.$set(this.questionList[bindex], "ques", optionsId);
       this.isDoOver();
@@ -1696,6 +1698,7 @@ export default {
      * @param {Object} e案例单选点击
      */
     radioSelectChild(optionsId, ansIndex, bindex) {
+      console.log('3333', this.questionList)
       if (this.questionList[bindex].ques[ansIndex]) return;
       this.$set(this.questionList[bindex].ques, ansIndex, optionsId);
       this.isDoOver();
@@ -1864,6 +1867,7 @@ export default {
      * 交卷
      */
     submit() {
+      console.log('itme--', this.questionList)
       let score = 0; //计算总分
       let reportStatus = 0;
       let number = 0; //做对的题目数量
@@ -1879,6 +1883,7 @@ export default {
         if (item.type == 1) {
           //正确
           if (item.ques == item.ans) {
+            console.log('sfsofhusdho')
             item.scoreResult = item.score;
             score += item.score;
             number++;

+ 26 - 8
pages5/examList/index.vue

@@ -42,8 +42,8 @@
 						</view>
 						<view class="btn-wrap">
 							<view class="btn-line">
-								<!-- mockActivity 1是活动模考,0否 -->
-								<view v-if="item.mockActivity == 1" class="btn" @click="goExamCount(item,index)">去考试</view>
+								<!-- mockActivity 1是活动模考,0否 && (!item.handStatus || item.handStatus == 0)-->
+								<view v-if="item.mockActivity == 1 " class="btn" @click="goExamCount(item,index)">去考试</view>
 								<view v-else>
 								<view class="btn test-disabled" v-if="goTest(item)" @click="goExamCount(item,index)">去考试</view>
 								<view class="btn test-disabled"  v-else-if="item.handStatus">已考试</view>
@@ -332,13 +332,31 @@ export default {
 				url:`../../pages/webview/index?url=`+encode
 			})
 		},
-		goExamCount(item,index) {
+		async goExamCount(item,index) {
 			console.log('item', item)
 			if (item.mockActivity && item.mockActivity == 1) {
-				item.applySiteExamTime = parseInt(new Date().getTime()/1000) // 当前时间的时间戳
-				item.applySiteStartTime = this.$method.timestampToTime(new Date().getTime()/1000, false, false, true)
-				let min = item.duration * 60 *1000 + new Date().getTime()
-				item.applySiteEndTime = this.$method.timestampToTime(min/1000, false, false, true)
+				await this.$http({
+					url: '/mock/apply/addMockTime',
+					method: 'post',
+					data: {
+						applyId: item.applyId,
+						duration: item.duration,
+						majorId: item.majorId,
+						subjectId: item.subjectId
+					},
+				}).then((res) => {
+					const { examTime, startTime, endTime, eachExamId} = res.data.data
+					item.applySiteExamTime = examTime // 当前时间的时间戳
+					item.applySiteStartTime = startTime
+					item.applySiteEndTime = endTime
+					item.eachExamId = eachExamId
+					// item.applySiteExamTime = parseInt(new Date().getTime()/1000) // 当前时间的时间戳
+					// item.applySiteStartTime = this.$method.timestampToTime(new Date().getTime()/1000, false, false, true)
+					// let min = item.duration * 60 *1000 + new Date().getTime()
+					// item.applySiteEndTime = this.$method.timestampToTime(min/1000, false, false, true)
+					console.log('item', item)
+				})
+				
 			}
 			
 			if(this.goTest(item)) {
@@ -348,7 +366,7 @@ export default {
 				})
 				return;
 			}
-			
+
 			this.itemIndex = index;
 			uni.navigateTo({
 				url:'../examCount/index?start='+this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) + ' ' + item.applySiteStartTime)+'&limit='+item.timeLimit+'&examId='+item.examId+'&eachExamId='+item.eachExamId+'&subscribeId='+item.subscribeId+'&mockName='+item.applyName +'&examEndTime='+this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) + ' ' + item.applySiteEndTime)

+ 1 - 0
pages5/examReport/index.vue

@@ -385,6 +385,7 @@ export default {
 		},
 		mockReport() {
 			return new Promise(resolve => {
+				// /mock/record/'+data
 				this.$api.mockReport(this.recordId).then(res => {
 					this.reportdata = res.data.data;
 					resolve()