Bladeren bron

修复bug

chenxiong 3 jaren geleden
bovenliggende
commit
81e29fe40c
6 gewijzigde bestanden met toevoegingen van 84 en 46 verwijderingen
  1. 5 0
      components/course/courseSection.vue
  2. 1 0
      pages2/subject/collect.vue
  3. 1 0
      pages2/subject/wrong.vue
  4. 47 28
      pages2/verify/input.vue
  5. 10 3
      pages2/wd/course.vue
  6. 20 15
      pages3/polyv/detail.vue

+ 5 - 0
components/course/courseSection.vue

@@ -316,6 +316,11 @@ export default {
 						//不允许试听
 						this.clickLock = false;
 						return
+					} else {
+						this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
+						this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
+						uni.$emit('getSection', this.menuItem)
+						return;
 					}
 					
 				}

+ 1 - 0
pages2/subject/collect.vue

@@ -148,6 +148,7 @@ export default {
 		goodsCollectExamList() {
 			this.$api.goodsCollectExamList({
 				paperId:this.paperid,
+				goodsId:this.goodsid,
 				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				this.testList = res.data 

+ 1 - 0
pages2/subject/wrong.vue

@@ -149,6 +149,7 @@ export default {
 		wrongRecordList() {
 			this.$api.wrongRecordList({
 				paperId:this.paperid,
+				goodsId:this.goodsid,
 				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				this.testList = res.data;

+ 47 - 28
pages2/verify/input.vue

@@ -1001,21 +1001,31 @@ export default {
 				this.fileList2 = lists;
 				if (lists[0].url.indexOf('//tmp') !== -1 || lists[0].url.indexOf('//temp') !== -1) {
 					let url = lists[0].url
-					this.$refs.idcard_face_photo[0].remove(0)
-					let res = await this.faceCertificationIDCardOCR(1,url);
+							this.$refs.idcard_face_photo[0].remove(0)
+					
+					uni.compressImage({
+						src: url,
+						quality: 75,
+						width: '50%',
+						height: '50%',
+						success: async rest => {
+							let res = await this.faceCertificationIDCardOCR(1,rest.tempFilePath);
+							
+							if(res.data.code == 500) {
+								uni.showToast({
+									icon:'none',
+									title:'请上传正确清晰的身份证人像面照片'
+								})
+								return;
+							}
+							this.$refs.idcard_face_photo[0].lists = [{
+								url:this.$method.splitImgHost(res.data.data.IdImgPath)
+							}]; 
+							this.$set(this.form, 'idcard_face_photo', res.data.data.IdImgPath);
+							console.log(this.form,'idcard_face_photo')
+						}
+					});
 					
-					if(res.data.code == 500) {
-						uni.showToast({
-							icon:'none',
-							title:'请上传正确清晰的身份证人像面照片'
-						})
-						return;
-					}
-					this.$refs.idcard_face_photo[0].lists = [{
-						url:this.$method.splitImgHost(res.data.data.IdImgPath)
-					}]; 
-					this.$set(this.form, 'idcard_face_photo', res.data.data.IdImgPath);
-					console.log(this.form,'idcard_face_photo')
 				}
 			} else {
 				this.fileList2 = [];
@@ -1032,20 +1042,29 @@ export default {
 				if (lists[0].url.indexOf('//tmp') !== -1 || lists[0].url.indexOf('//temp') !== -1) {
 					console.log('//tem')
 					let url = lists[0].url
-					this.$refs.idcard_national_photo[0].remove(0)
-					let res = await this.faceCertificationIDCardOCR(2,url);
-					if(res.data.code == 500) {
-						uni.showToast({
-							icon:'none',
-							title:'请上传正确清晰的身份证国徽面照片'
-						})
-						return;
-					}
-					this.$refs.idcard_national_photo[0].lists = [{
-						url:this.$method.splitImgHost(res.data.data.IdImgPath)
-					}]; 
-					this.$set(this.form, 'idcard_national_photo', res.data.data.IdImgPath);
-					console.log(this.form,'idcard_national_photo')
+							this.$refs.idcard_national_photo[0].remove(0)
+					uni.compressImage({
+						src: url,
+						quality: 75,
+						width: '50%',
+						height: '50%',
+						success: async rest => {
+							let res = await this.faceCertificationIDCardOCR(2,rest.tempFilePath);
+							if(res.data.code == 500) {
+								uni.showToast({
+									icon:'none',
+									title:'请上传正确清晰的身份证国徽面照片'
+								})
+								return;
+							}
+							this.$refs.idcard_national_photo[0].lists = [{
+								url:this.$method.splitImgHost(res.data.data.IdImgPath)
+							}]; 
+							this.$set(this.form, 'idcard_national_photo', res.data.data.IdImgPath);
+							console.log(this.form,'idcard_national_photo')
+						}
+					});
+					
 				}
 			} else {
 				this.fileList3 = [];

+ 10 - 3
pages2/wd/course.vue

@@ -126,7 +126,7 @@ export default {
           });
           return;
         }
-
+				
         this.$api.courseDetail(item.courseId).then((res) => {
           if (res.data.code == 200) {
             if (res.data.data.educationName == "继续教育") {
@@ -181,6 +181,7 @@ export default {
               });
               return;
             }
+						
 
             this.$api.courseDetail(item.courseId).then((res) => {
               if (res.data.code == 200) {
@@ -235,7 +236,7 @@ export default {
             });
             return;
           }
-
+					
           this.$api.courseDetail(item.courseId).then((res) => {
             if (res.data.code == 200) {
               if (res.data.data.educationName == "继续教育") {
@@ -263,7 +264,13 @@ export default {
                   });
 
                 // websocket.sendMsg("doCourse");
-              }
+              } else {
+								this.$navTo.togo("/pages3/polyv/detail", {
+								  id: item.courseId,
+								  goodsId: this.goodsId,
+								  orderGoodsId: this.orderGoodsId,
+								});
+							}
             }
           });
         }

+ 20 - 15
pages3/polyv/detail.vue

@@ -36,7 +36,7 @@
             @statechange="onStateChange"
             @fullscreenchange="fullscreenchange"
             @error="playError"
-            :autoplay="autoplay"
+            :autoplay="true"
             :isAllowSeek="isAllowSeek"
             :playbackRate="playbackRate"
             :startTime="startTime"
@@ -510,6 +510,7 @@ export default {
   },
   data() {
     return {
+			channelItem:null,
       lockTimer: null,
       orderGoodsId: 0,
       noticeShow: false,
@@ -601,7 +602,7 @@ export default {
   onLoad(option) {
     this.courseId = Number(option.id);
     this.goodsId = Number(option.goodsId);
-    this.orderGoodsId = Number(option.orderGoodsId);
+    this.orderGoodsId = Number(option.orderGoodsId) || '';
     this.courseDetail();
     this.getGoodsDetail();
     this.getAnswerList();
@@ -624,6 +625,8 @@ export default {
       this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
       this.$store.commit("updatePlayNextId", playNextId);
       console.log("this.playNoteVideo");
+			
+			this.playNoteVideo(item)
     }
   },
   onShow() {
@@ -830,6 +833,7 @@ export default {
       //清除录播
       this.$store.commit("setPlayVID", { playVID: null });
       this.playChannel(item);
+			this.channelItem = item;
     });
     uni.$on("isRebuild", (item) => {
       console.log(item);
@@ -860,19 +864,19 @@ export default {
               console.log("Rebuild1");
               if (res.data.code == 200) {
                 if (res.data.rows.length) {
-                  // res.data.rows[index].name = res.data.rows[index].menuName;
-                  // this.$set(this.reMenuList,index,res.data.rows[index])
-                  // for (let i = 0; i < res.data.rows.length; i++) {
-                  // 	let item = res.data.rows[i];
-                  // 	item.down = true;
-                  // 	item.id = item.menuId;
-                  // 	item.name = item.menuName;
-                  // }
-                  // this.reMenuList = []
-                  // this.$nextTick(() => {
-                  // 	this.reMenuList = res.data.rows;
-                  // 	console.log(this.reMenuList,'this.reMenuList1')
-                  // })
+                  res.data.rows[index].name = res.data.rows[index].menuName;
+                  this.$set(this.reMenuList,index,res.data.rows[index])
+                  for (let i = 0; i < res.data.rows.length; i++) {
+                  	let item = res.data.rows[i];
+                  	item.down = true;
+                  	item.id = item.menuId;
+                  	item.name = item.menuName;
+                  }
+                  this.reMenuList = []
+                  this.$nextTick(() => {
+                  	this.reMenuList = res.data.rows;
+                  	console.log(this.reMenuList,'this.reMenuList1')
+                  })
                 } else {
                   this.reMenuList = [];
                 }
@@ -1258,6 +1262,7 @@ export default {
           this.liveDuration = this.liveDuration + 1; //每隔1秒
           if (this.liveDuration == 2) {
             //直播第2秒拍照
+						console.log(this.channelItem)
             if (
               this.goodsPhotographConfig.livephotograph == 1 &&
               this.channelItem.learning != 1