caichengyu 8 miesięcy temu
rodzic
commit
49a30cf5b6

+ 1 - 1
config/prod.env.js

@@ -2,7 +2,7 @@
 module.exports = {
   NODE_ENV: '"production"',
   BASE_IMG_URL: '"https://file.xyyxt.net/"', //图片上传api
-  BASE_URL: '"https://api.xyyxt.net"',//正式
+  BASE_URL: '"https://api.gdzckj.net"',//正式"https://api.xyyxt.net"
   TENANT_ID: '"867735392558919680"',
   ENV_ID: '"prod"',//生产环境
   WEAPP_LOGO: '"@/assets/xcxqrcode.jpg"', // 微信小程序扫码图片

+ 7 - 0
src/apis/course.js

@@ -320,6 +320,13 @@ export default {
 			data: data
 		})
 	},
+	abnormal(data) {
+		return request({
+			url: '/study/record/abnormal',
+			method: 'post',
+			data: data
+		})
+	},
 	getPhotoLastRecord(data) {
 		return request({
 			url: '/course/photo/log/getLastInfo',

+ 14 - 2
src/components/takePicture/index.vue

@@ -17,17 +17,29 @@
             <div class="content">
               <p>1、请保证摄像头正对自己,避免头像偏左或者偏右。并离远一点拍照,肩膀要拍到。</p>
               <p>
-                2、请保证拍照环境光线充足(照片太暗或曝光会降低验证通过率)。
+                2、请勿在灯光昏暗处进行学习,保证拍照环境光线充足(照片太暗或曝光会降低验证通过率)。
               </p>
               <p>
                 3、请保证整个头像在人脸识别区域内,脸部无遮挡装饰物(佩戴眼镜会降低通过率)。
               </p>
               <p>
-                4、拍照时不要开启背景虚化,保证背景清晰。
+                4、拍照时不要开启背景虚化,保证背景清晰。
               </p>
               <p>
                 5、如果下面视频中出现黑屏,摄像头可能被其他进程占用,请关闭其他调用摄像头的程序,重新刷新当前页面重新拍照识别。
               </p>
+              <p>
+                6、勿拉进度条或倍数观看。
+              </p>
+              <p>
+                7、勿使用照片进行识别。
+              </p>
+              <p>
+                8、规范学习,勿在开车过程进行学习。
+              </p>
+              <p style="color: red;">
+                学习过程如出现违规现象,一律打回重修。
+              </p>
             </div>
           </div>
           <div class="right-box">

+ 5 - 0
src/components/takePicture/media.vue

@@ -51,6 +51,11 @@ export default {
   methods: {
     openBoxs() {
       this.takeVideoModal = true;
+      this.status=1;
+      this.mediaRecorder=null;
+      this.videoblob=null;
+      this.url=null;
+      this.faceUrl=null;
       this.$nextTick(() => {
         const video = document.getElementById("video2");
         navigator.mediaDevices

+ 14 - 0
src/components/videoCy/index.vue

@@ -1088,16 +1088,19 @@ export default {
               } else {
                 polyvPlayerContext.j2s_pauseVideo();
               }
+              this.abnormal(data);
               this.$refs.countDown.openBoxsRestart(err.code);
             }
             else if (err.code === 559) {
               console.log("拍照不够触发");
+              this.abnormal(data);
               this.$message.error(err.msg);
               this.openPhotoStatus = 1;
               setTimeout(() => {
                 this.openPhoto();
               }, 1500);
             } else if (err.code === 558) {
+              this.abnormal(data);
               this.$refs.countDown.openBoxs(parseInt(err.msg.split(",")[1]));
             }
              else if (err.code === 601) {
@@ -1108,6 +1111,17 @@ export default {
           });
       });
     },
+    //异常记录
+    abnormal(data){
+      this.$request
+          .abnormal(data)
+        .then((res) => {
+          
+        })
+        .catch((err) => {
+          console.log(err, "err");
+        });
+    },
     //重置视频学习
     resetSection(errcode){
       let data = {

+ 1 - 0
src/pages/course-exam/index.vue

@@ -1295,6 +1295,7 @@ export default {
         gradeId: this.gradeId,
         orderGoodsId: this.orderGoodsId
       });
+      // let compareFaceData =window.location.hostname.indexOf('localhost')>-1?90: await this.faceRecognition(photoUrl);
       let compareFaceData = await this.faceRecognition(photoUrl);
       if (compareFaceData >= 80) {
         //提交拍照记录

+ 4 - 1
src/pages/person-center/my-course/components/dialogForm.vue

@@ -176,6 +176,7 @@ export default {
                   {
                     confirmButtonText: "线上缴费",
                     cancelButtonText: "线下申请",
+                    distinguishCancelAndClose: true,
                   }
                 )
                   .then((_) => {
@@ -209,8 +210,9 @@ export default {
                     //   path: "/payment-success",
                     // });
                   })
-                  .catch(() => {
+                  .catch(action => {
                     //点击了取消按钮
+                    if(action=='cancel'){
                     this.$request
                       .subscribesaveoffline({
                         appId: data.applyId,
@@ -231,6 +233,7 @@ export default {
                         this.$parent.cancel();
                         this.isShow = false;
                       });
+                    }
                   })
                   .finally(() => {});
               })

+ 2 - 2
src/pages/person-center/my-order/index.vue

@@ -61,7 +61,7 @@
                     class="btn btn--nobg"
                     @click="refund(item.orderSn, items)"
                     v-if="
-                      items.periodStatus !== 0 &&
+                      (items.periodStatus !== 0 &&
                       items.periodStatus !== 1 &&
                       items.periodStatus !== 2 &&
                       items.refundStatus === 0 &&
@@ -73,7 +73,7 @@
                         items.goodsType == '2' ||
                         items.goodsType == '3'||
                         items.goodsType == '6') &&
-                      items.goodsPrice > 0
+                      items.goodsPrice > 0)||(items.refundStatus === 0 &&item.orderType==3&&item.orderFrom==7)
                     "
                   >
                     申请退款

+ 1 - 1
src/store/index.js

@@ -169,7 +169,7 @@ export default new Vuex.Store({
             favicon.href = response.data.data == '867735392558919680' ? '/static/favicon.ico' : '/static/favicons.ico'
             document.head.appendChild(favicon)
             // const ps = prompt()
-            // commit('setTENANT_NANE',"680980002459417532")//"480813706424615769")// 779352047136603
+            // commit('setTENANT_NANE',"440122789039318928")//"480813706424615769")// 779352047136603
             commit('setTENANT_NANE', response.data.data)
             resolve()
           })