Browse Source

图片压缩、拍照框加蒙层

谢杰标 3 years ago
parent
commit
3a33a91835

+ 5 - 0
package-lock.json

@@ -5363,6 +5363,11 @@
       "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==",
       "dev": true
     },
+    "image-conversion": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/image-conversion/-/image-conversion-2.1.1.tgz",
+      "integrity": "sha512-hnMOmP7q2jxA+52FZ+wHNhg3fdFRlgfngsQH2JQHEQkafY7tj/8F15e6Rv/RxDegc872jvyaRHwMbkTZK1Cjbg=="
+    },
     "import-cwd": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz",

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
   "dependencies": {
     "axios": "^0.26.1",
     "element-ui": "^2.15.6",
+    "image-conversion": "^2.1.1",
     "js-base64": "^3.7.2",
     "jsencrypt": "^3.2.1",
     "moment": "^2.29.2",

+ 118 - 118
src/common/tools.js

@@ -8,15 +8,15 @@ import { JSEncrypt } from "jsencrypt";
 let publicKey = "-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4qkbwIKErstK1sFESPEhOShpRpj4+sOVpJHxl5r/2xLBfA/MrXcAEra5Ro9cXNQSqmLLt8wecoLk/glfa5IdhXV0hRVQplIVs5z3MxcUa9ptKPHUTgh8xMCBvl8sUJKwkmn4vYWeDfHT22EL7Hr1pTMwUhF6WiNlWfQTVoF1rhwIDAQAB-----END PUBLIC KEY-----"
 
 export default {
-  getToken() {
-    return localStorage.getItem('token')
-  },
+	getToken() {
+		return localStorage.getItem('token')
+	},
 
-  getUserAccount() {
-    return localStorage.getItem('user_account')
-  },
+	getUserAccount() {
+		return localStorage.getItem('user_account')
+	},
 
-  //图片路径填补
+	//图片路径填补
 	splitImgHost(url, scale = false, width = 250) {
 		if (!url) {
 			return ''
@@ -32,7 +32,7 @@ export default {
 
 	},
 
-  isLogin() {
+	isLogin() {
 		if (localStorage.getItem('user_account')) {
 			return true;
 		} else {
@@ -40,30 +40,30 @@ export default {
 		}
 	},
 
-  setUuid(id) {
-    sessionStorage.setItem('uuid',id)
-  },
+	setUuid(id) {
+		sessionStorage.setItem('uuid', id)
+	},
+
+	getUuid() {
+		return sessionStorage.getItem('uuid')
+	},
 
-  getUuid() {
-    return sessionStorage.getItem('uuid')
-  },
+	exit() {
 
-  exit() {
-    
 		localStorage.removeItem('user_account')
 		localStorage.removeItem('token')
-    sessionStorage.removeItem('uuid')
+		sessionStorage.removeItem('uuid')
 		store.state.userInfo = null
 
-    if(router.currentRoute.path != '/home') {
-      router.replace({
-        path: '/home'
-      })
-    }
-		
+		if (router.currentRoute.path != '/home') {
+			router.replace({
+				path: '/home'
+			})
+		}
+
 	},
 
-  //当前时间距离目标时间还有多久
+	//当前时间距离目标时间还有多久
 	GetRTime(EndTime, isDay = true) {
 		var EndTime = EndTime //结束时间
 		var NowTime = new Date(); //当前时间
@@ -105,121 +105,121 @@ export default {
 		return tmp;
 	},
 
-      /**
-      * 
-     * @param {int} result 
-     * @returns {string}
-     * @remard 单位S转小时分钟秒
-     */
-  secondToTime(result,Diszing = true) {
-    var h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
-    var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
-    var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
-    if (h == 0 && Diszing) {
-      result = m + ":" + s;
-    } else {
-      result = h + ':' + m + ":" + s
-    }
-    return result;
-  },
-
-  /* 时间戳转换成日期
-	 * @param timestamp
-	 * @returns {*}
-	 */
-	timestampToTime(timestamp, isDay = true,hasChinese) {
+	/**
+	* 
+   * @param {int} result 
+   * @returns {string}
+   * @remard 单位S转小时分钟秒
+   */
+	secondToTime(result, Diszing = true) {
+		var h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
+		var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
+		var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
+		if (h == 0 && Diszing) {
+			result = m + ":" + s;
+		} else {
+			result = h + ':' + m + ":" + s
+		}
+		return result;
+	},
+
+	/* 时间戳转换成日期
+	   * @param timestamp
+	   * @returns {*}
+	   */
+	timestampToTime(timestamp, isDay = true, hasChinese) {
 		if (!timestamp) {
 			return ''
 		}
 		var date = new Date(timestamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
 		var Y = date.getFullYear() + (hasChinese ? '' : '-');
 		var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + (hasChinese ? '' : '-');
-		var D = date.getDate() < 10 ? '0' + date.getDate() + (hasChinese ? '' : ' ') : date.getDate() + (hasChinese ? '' :' ');
+		var D = date.getDate() < 10 ? '0' + date.getDate() + (hasChinese ? '' : ' ') : date.getDate() + (hasChinese ? '' : ' ');
 		var h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
 		var m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
 		var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
 		if (isDay) {
-			
-			if(hasChinese) {
-				return Y +'年'+ M +'月'+ D + '日';
+
+			if (hasChinese) {
+				return Y + '年' + M + '月' + D + '日';
 			} else {
 				return Y + M + D;
 			}
-			
+
 		}
-		
-		if(hasChinese) {
-			return Y +'年'+ M +'月'+ D + '日' + h + m + s;
+
+		if (hasChinese) {
+			return Y + '年' + M + '月' + D + '日' + h + m + s;
 		} else {
 			return Y + M + D + h + m + s;
 		}
-		
+
 	},
 
-  secondToDate(result){
-		var h = Math.floor(result / 3600) < 10 ? '0'+Math.floor(result / 3600) : Math.floor(result / 3600);
+	secondToDate(result) {
+		var h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
 		var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
 		var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
-			if(h==0){
-				result = m + ":" + s;
-			}else{
-				result = h+':'+m + ":" + s
-			}
+		if (h == 0) {
+			result = m + ":" + s;
+		} else {
+			result = h + ':' + m + ":" + s
+		}
 		return result;
-	 },
-
-   getZeroTime () {
-		return Number(new Date(new Date().toLocaleDateString()).getTime()/1000)
-	},
-
-   /**
-    * 
-    * @param {*} urlData 
-    * @returns 
-    * base64转formdata格式文件
-    */
-   convertBase64UrlToBlob(urlData) { 
-    var bytes = window.atob(urlData.split(",")[1]);
-    var ab = new ArrayBuffer(bytes.length);
-    var ia = new Uint8Array(ab);
-    for (var i = 0; i < bytes.length; i++) {
-      ia[i] = bytes.charCodeAt(i);
-    }
-    return new Blob([ab], { type: "image/jpeg" });
-  },
-
-
-  imageToBase64(url,quality = 0.8) {
-    return new Promise(resolve => {
-      var image = new Image();
-      // 解决跨域 Canvas 污染问题,
-      image.setAttribute("crossorigin", "anonymous");
-      image.onload = function () {
-        var canvas = document.createElement("canvas");
-        canvas.width = image.width;
-        canvas.height = image.height;
-        var context = canvas.getContext("2d");
-        context.drawImage(image, 0, 0, image.width, image.height);
-        var url = canvas.toDataURL("image/jpeg",quality); //将图片格式转为base64
-
-        resolve(url)
-      };
-      image.src = url + "?time=" + Date.now();
-    })
-    
-  },
-
-  /**
-   * 
-   * @param {*} data 
-   * @returns 
-   * 加密
-   */
-  encryptor(data) {
-    let encryptor = new JSEncrypt(); 
-    encryptor.setPublicKey(publicKey); 
-    let data_encrypted = encryptor.encrypt(data);
-    return data_encrypted;
-  },
+	},
+
+	getZeroTime() {
+		return Number(new Date(new Date().toLocaleDateString()).getTime() / 1000)
+	},
+
+	/**
+	 * 
+	 * @param {*} urlData 
+	 * @returns 
+	 * base64转formdata格式文件
+	 */
+	convertBase64UrlToBlob(urlData) {
+		var bytes = window.atob(urlData.split(",")[1]);
+		var ab = new ArrayBuffer(bytes.length);
+		var ia = new Uint8Array(ab);
+		for (var i = 0; i < bytes.length; i++) {
+			ia[i] = bytes.charCodeAt(i);
+		}
+		return new Blob([ab], { type: "image/jpeg" });
+	},
+
+
+	imageToBase64(url, quality = 0.8) {
+		return new Promise(resolve => {
+			var image = new Image();
+			// 解决跨域 Canvas 污染问题,
+			image.setAttribute("crossorigin", "anonymous");
+			image.onload = function () {
+				var canvas = document.createElement("canvas");
+				canvas.width = image.width;
+				canvas.height = image.height;
+				var context = canvas.getContext("2d");
+				context.drawImage(image, 0, 0, image.width, image.height);
+				var url = canvas.toDataURL("image/jpeg", quality); //将图片格式转为base64
+
+				resolve(url)
+			};
+			image.src = url + "?time=" + Date.now();
+		})
+
+	},
+
+	/**
+	 * 
+	 * @param {*} data 
+	 * @returns 
+	 * 加密
+	 */
+	encryptor(data) {
+		let encryptor = new JSEncrypt();
+		encryptor.setPublicKey(publicKey);
+		let data_encrypted = encryptor.encrypt(data);
+		return data_encrypted;
+	},
 
 }

+ 12 - 0
src/pages/course-detail/index copy.vue

@@ -1646,6 +1646,7 @@
           <div class="right-box">
             <img v-show="!isTaking" :src="faceUrl" alt="" />
             <video v-show="isTaking" id="video" :src="stream"></video>
+            <div class="mask"></div>
           </div>
         </div>
         <div class="take-photo__footer">
@@ -7276,6 +7277,17 @@ export default {
           width: 100%;
           height: 100%;
         }
+        .mask {
+          width: 55%;
+          height: 200px;
+          position: absolute;
+          top: 0;
+          left: 0;
+          right: 0;
+          bottom: 0;
+          margin: 30px auto 0;
+          box-shadow: 0 0 0 2000px rgba(0,0,0,0.4);
+        }
       }
     }
 

File diff suppressed because it is too large
+ 321 - 245
src/pages/course-detail/index.vue


+ 18 - 5
src/pages/course-exam/index.vue

@@ -1106,6 +1106,7 @@
           <div class="right-box">
             <img v-show="!isTaking" :src="faceUrl" alt="" />
             <video v-show="isTaking" id="video" :src="stream"></video>
+            <div class="mask"></div>
           </div>
         </div>
         <div class="take-photo__footer">
@@ -1422,6 +1423,7 @@ export default {
     //拍照
     openPhoto() {
       this.$nextTick(() => {
+        console.log(window.navigator.mediaDevices);
         if (
           (window.navigator.mediaDevices &&
             window.navigator.mediaDevices.getUserMedia) ||
@@ -1449,7 +1451,7 @@ export default {
     async takeOk() {
       this.loading = true;
       let compareFaceData = await this.faceRecognition();
-      this.compareFaceData = compareFaceData
+      this.compareFaceData = compareFaceData;
       if (compareFaceData == 0) {
         this.$message({
           type: "warning",
@@ -1484,7 +1486,7 @@ export default {
         recordId: self.recordId,
       };
       if (this.ossAvatarUrl) {
-        data.similarity = this.compareFaceData // 相似度
+        data.similarity = this.compareFaceData; // 相似度
       }
       this.$request
         .studyExamPhotoRecord(data)
@@ -1973,7 +1975,6 @@ export default {
 
       question.ques.imageList = question.ansText.imageList;
       question.ques.text = question.ansText.text;
-
     },
     ansSubmitChild(question, questionIndex, jsonIndex) {
       if (
@@ -2787,7 +2788,6 @@ export default {
             float: right;
             width: 299px;
             border-right: 1px solid #eee;
-
             &__header {
               height: 40px;
               line-height: 40px;
@@ -3026,11 +3026,24 @@ export default {
         float: right;
         width: 400px;
         height: 300px;
-
+        position: relative;
+        overflow: hidden;
         video {
           width: 100%;
           height: 100%;
         }
+
+        .mask {
+          width: 55%;
+          height: 200px;
+          position: absolute;
+          top: 0;
+          left: 0;
+          right: 0;
+          bottom: 0;
+          margin: 30px auto 0;
+          box-shadow: 0 0 0 2000px rgba(0,0,0,0.4);
+        }
       }
     }
 

+ 85 - 88
src/pages/live-detail/index.vue

@@ -15,7 +15,7 @@
         </div>
         <div class="section__body">
           <div class="container">
-            <div class="course-info"> 
+            <div class="course-info">
               <div class="course-info__header clearfix">
                 <div
                   class="left-box"
@@ -1825,6 +1825,7 @@
           <div class="right-box">
             <img v-show="!isTaking" :src="faceUrl" alt="" />
             <video v-show="isTaking" id="video" :src="stream"></video>
+            <div class="mask"></div>
           </div>
         </div>
         <div class="take-photo__footer">
@@ -2416,7 +2417,7 @@ import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
 import GoodsItem from "@/components/goodsItem/index";
-
+import * as imageConversion from "image-conversion";
 import { mapGetters, mapMutations } from "vuex";
 import * as baseUrls from "@/axios.js";
 import pdf from "vue-pdf";
@@ -2860,7 +2861,7 @@ export default {
         }, 1000);
       }
     } else {
-      console.log('------')
+      console.log("------");
       this.studyRecordQueryLiveLast();
     }
     // let noteSecond = this.$route.query.noteSecond;
@@ -2963,7 +2964,7 @@ export default {
               this.playSectionId = res.data.sectionId;
               this.vid = res.data.recordingUrl;
               this.sectionItem = res.data;
-              console.log('回放啊')
+              console.log("回放啊");
               this.playVideo(res.data);
             }
           }
@@ -3012,7 +3013,7 @@ export default {
     async takeOk() {
       this.loading = true;
       let compareFaceData = await this.faceRecognition();
-      this.compareFaceData = compareFaceData
+      this.compareFaceData = compareFaceData;
       if (compareFaceData >= 80) {
         const waitYS = await this.imageInfos();
         this.postCoursePhotoRecord()
@@ -3060,20 +3061,8 @@ export default {
       }
     },
 
-    changePhotoListStamp(params, fileList) {
-      const file = params.raw;
-      const fileType = file.type;
-      const isImage = fileType.indexOf("image") != -1;
-      const isLt2M = file.size / 1024 / 1024 < 2;
-      // 这里常规检验,看项目需求而定
-      if (!isImage) {
-        this.$message.error("只能上传图片格式png、jpg、gif!");
-        return;
-      }
-      if (!isLt2M) {
-        this.$message.error("只能上传图片大小小于2M");
-        return;
-      }
+    async changePhotoListStamp(params, fileList) {
+      let file = await this.uploadRules(params);
       if (fileList.length == 1) {
         fileList.splice(0, 1);
       }
@@ -3101,22 +3090,28 @@ export default {
       this.$emit("current", e);
       this.curPageNum = e;
     },
-
-    changePhotoListHeader1(params, fileList) {
-      console.log(params);
-      const file = params.raw;
-      const fileType = file.type;
-      const isImage = fileType.indexOf("image") != -1;
-      const isLt2M = file.size / 1024 / 1024 < 2;
-      // 这里常规检验,看项目需求而定
-      if (!isImage) {
-        this.$message.error("只能上传图片格式png、jpg、gif!");
-        return;
-      }
-      if (!isLt2M) {
-        this.$message.error("只能上传图片大小小于2M");
-        return;
-      }
+    uploadRules(params) {
+      return new Promise((resolve, reject) => {
+        const file = params.raw;
+        const fileType = file.type;
+        const isImage = fileType.indexOf("image") != -1;
+        const sizeToM = file.size / 1024 / 1024;
+        if (!isImage) {
+          this.$message.error("只能上传图片格式png、jpg、gif!");
+          reject(false);
+        }
+        if (sizeToM > 2) {
+          imageConversion.compressAccurately(file, 1024 * 2).then((res) => {
+            res = new File([res], file.name, { type: res.type });
+            resolve(res);
+          });
+        } else {
+          resolve(file);
+        }
+      });
+    },
+    async changePhotoListHeader1(params, fileList) {
+      let file = await this.uploadRules(params);
       if (fileList.length == 1) {
         fileList.splice(0, 1);
       }
@@ -3140,19 +3135,7 @@ export default {
     },
 
     async changePhotoListHeader2(params, fileList) {
-      const file = params.raw;
-      const fileType = file.type;
-      const isImage = fileType.indexOf("image") != -1;
-      const isLt2M = file.size / 1024 / 1024 < 2;
-      // 这里常规检验,看项目需求而定
-      if (!isImage) {
-        this.$message.error("只能上传图片格式png、jpg、gif!");
-        return;
-      }
-      if (!isLt2M) {
-        this.$message.error("只能上传图片大小小于2M");
-        return;
-      }
+      let file = await this.uploadRules(params);
 
       if (fileList.length == 1) {
         fileList.splice(0, 1);
@@ -3195,19 +3178,7 @@ export default {
     },
 
     async changePhotoListHeader3(params, fileList) {
-      const file = params.raw;
-      const fileType = file.type;
-      const isImage = fileType.indexOf("image") != -1;
-      const isLt2M = file.size / 1024 / 1024 < 2;
-      // 这里常规检验,看项目需求而定
-      if (!isImage) {
-        this.$message.error("只能上传图片格式png、jpg、gif!");
-        return;
-      }
-      if (!isLt2M) {
-        this.$message.error("只能上传图片大小小于2M");
-        return;
-      }
+      let file = await this.uploadRules(params);
 
       if (fileList.length == 1) {
         fileList.splice(0, 1);
@@ -4139,7 +4110,7 @@ export default {
         self.listData.forEach((item) => {
           if (item.fieldKey == "idcard") {
             this.infoForm.idcard = this.userInfo.idCard;
-             this.disCard = this.infoForm.idcard ? true : false
+            this.disCard = this.infoForm.idcard ? true : false;
           }
           if (item.fieldKey == "telphone") {
             this.infoForm.telphone = this.userInfo.telphone;
@@ -4147,7 +4118,7 @@ export default {
 
           if (item.fieldKey == "name") {
             this.infoForm.name = this.userInfo.realname || "";
-            this.disName = this.infoForm.name ? true : false
+            this.disName = this.infoForm.name ? true : false;
           }
         });
         self.isRequired = self.listData.every((ims) => {
@@ -4751,28 +4722,28 @@ export default {
     // 新增用户视频学习日志
     studyLog(moduleId, chapterId, sectionId) {
       this.$axios({
-        url: '/user/study/log',
-        method: 'post',
+        url: "/user/study/log",
+        method: "post",
         data: {
           goodsId: this.goodsId,
           courseId: this.courseId,
-					moduleId: moduleId || 0,
-					chapterId: chapterId || 0,
+          moduleId: moduleId || 0,
+          chapterId: chapterId || 0,
           sectionId: sectionId || 0,
           fromPlat: 2, //来源平台 1小程序 2PC网站
           goodsType: 6, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
           orderGoodsId: this.orderGoodsId,
-        }
+        },
       }).then((res) => {
-        console.log('直播的用户学习日志:', res)
-      })
+        console.log("直播的用户学习日志:", res);
+      });
     },
     /**
      * 点击节
      */
     async getResource(section) {
-      console.log('回放回放', section)
-      this.clickSectionItem = section
+      console.log("回放回放", section);
+      this.clickSectionItem = section;
       //逻辑
 
       if (section.type == 2) {
@@ -4830,7 +4801,11 @@ export default {
 
               return;
             }
-            this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
+            this.studyLog(
+              (section.moduleId = 0),
+              (section.chapterId = 0),
+              section.typeId
+            );
           } else {
             this.$message({
               type: "warning",
@@ -4910,7 +4885,11 @@ export default {
 
               return;
             }
-            this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
+            this.studyLog(
+              (section.moduleId = 0),
+              (section.chapterId = 0),
+              section.typeId
+            );
           } else {
             this.$message({
               type: "warning",
@@ -4954,7 +4933,11 @@ export default {
 
             return;
           }
-          this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
+          this.studyLog(
+            (section.moduleId = 0),
+            (section.chapterId = 0),
+            section.typeId
+          );
         }
         return;
       }
@@ -4965,14 +4948,15 @@ export default {
         }
         this.clickLock = true;
         if (
-          section.sectionType != 3 && this.playSectionId &&
+          section.sectionType != 3 &&
+          this.playSectionId &&
           (this.playSectionId == section.sectionId ||
             this.playSectionId == section.menuId) &&
           this.moduleId == (section.moduleId || 0) &&
           this.chapterId == (section.chapterId || 0)
         ) {
           //切换为同一频道不作为
-          console.log('---====', this.moduleId, this.chapterId)
+          console.log("---====", this.moduleId, this.chapterId);
           this.clickLock = false;
           return;
         }
@@ -5068,7 +5052,7 @@ export default {
       }
     },
     async initVideo(option) {
-      console.log('initVideo', option)
+      console.log("initVideo", option);
       if (option.sectionType == 1 || option.sectionType == 3) {
         //录播
 
@@ -5206,9 +5190,10 @@ export default {
       console.log(option, "<-----option", this.clickSectionItem);
 
       if (option.sectionType == 3) {
-        console.log('huifang')
+        console.log("huifang");
         // 回放
-        if (Object.keys(this.clickSectionItem).length) { //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
+        if (Object.keys(this.clickSectionItem).length) {
+          //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
           this.$router.push({
             path: "/living-room/" + option.liveUrl,
             query: {
@@ -5222,10 +5207,10 @@ export default {
               sectionType: 3,
               goodsName: option.name,
               vid: option.recordingUrl, // 回放vid
-            }          
-          })
-          this.clickSectionItem = {}
-          return
+            },
+          });
+          this.clickSectionItem = {};
+          return;
         }
       }
       if (option.sectionType == 1) {
@@ -5268,7 +5253,7 @@ export default {
         setTimeout(() => {
           this.clickLock = false;
         }, 3000);
-        this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
+        this.studyLog(this.moduleId, this.chapterId, this.playSectionId);
         // uni.$emit("levelId", this.levelId);
         // uni.$emit("getSection", this.menuItem);
         // uni.$emit("isRebuild", this.isRebuild);
@@ -5313,7 +5298,7 @@ export default {
             moduleId: option.moduleId || 0,
             sectionType: 2,
             goodsName: option.name,
-          },          
+          },
         });
         // this.loadPlayerScriptzb(this.loadPlayerzb);
         // setTimeout(() => {
@@ -5823,7 +5808,7 @@ export default {
       console.log(this);
       console.log(PlayDuration, "PlayDuration");
       let data = {
-        fromPlat: 2, //来源平台 1小程序 2网站	
+        fromPlat: 2, //来源平台 1小程序 2网站
         photo: self.ossAvatarUrl,
         sectionId: parseInt(this.playSectionId),
         goodsId: parseInt(this.goodsId),
@@ -5836,7 +5821,7 @@ export default {
         orderGoodsId: this.orderGoodsId,
       };
       if (this.ossAvatarUrl) {
-        data.similarity = this.compareFaceData // 相似度
+        data.similarity = this.compareFaceData; // 相似度
       }
       if (status > 0) {
         data.status = status;
@@ -7475,6 +7460,18 @@ export default {
           width: 100%;
           height: 100%;
         }
+
+        .mask {
+          width: 55%;
+          height: 200px;
+          position: absolute;
+          top: 0;
+          left: 0;
+          right: 0;
+          bottom: 0;
+          margin: 30px auto 0;
+          box-shadow: 0 0 0 2000px rgba(0,0,0,0.4);
+        }
       }
     }
 

+ 19 - 19
src/pages/person-center/my-course/index.vue

@@ -1274,29 +1274,29 @@ export default {
       }
 
       var confirmDetail = true;
-      if (item.educationName == "继续教育") {
-        if (
-          item.officialName &&
-          item.businessName == "二级" &&
-          item.projectName == "建造师"
-        ) {
-          confirmDetail = await this.userConfirmInfoDetail();
-        }
-      }
+      // if (item.educationName == "继续教育") {
+      //   if (
+      //     item.officialName &&
+      //     item.businessName == "二级" &&
+      //     item.projectName == "建造师"
+      //   ) {
+      //     confirmDetail = await this.userConfirmInfoDetail();
+      //   }
+      // }
 
-      // //内部系统
-      // if (item.interfacePushId > 0 && item.officialStatus != 1) {
-      //   this.$message({
-      //     type: "warning",
-      //     message: "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
-      //   });
+      // // //内部系统
+      // // if (item.interfacePushId > 0 && item.officialStatus != 1) {
+      // //   this.$message({
+      // //     type: "warning",
+      // //     message: "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
+      // //   });
+      // //   return;
+      // // }
+
+      // if (!confirmDetail) {
       //   return;
       // }
 
-      if (!confirmDetail) {
-        return;
-      }
-
       let rebuildStatus = await this.courseGoodsRebuildStatus(
         item.goodsId,
         item.gradeId

Some files were not shown because too many files changed in this diff