Browse Source

fix: 1.下一节弹窗拍照 2、学员须知和自动播放拍照弹窗同时出现的问题

xuqiaoying 2 years ago
parent
commit
7e9652f7f5
4 changed files with 38 additions and 22 deletions
  1. 7 7
      common/request.js
  2. 1 1
      components/course/courseChapter.vue
  3. 1 1
      manifest.json
  4. 29 13
      pages3/polyv/detail.vue

+ 7 - 7
common/request.js

@@ -5,23 +5,23 @@ import method from '@/common/methodTool.js'
 import api from './api.js'
 var num = 1
 //接口api   
-export const BASE_URL = 'https://api.xyyxt.net'   //release
+// 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.78: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'    //后端本地
 // export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
 
  //图片上传api
-export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // web_view的
 // export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release-祥粤云学堂
-export const WEBVIEW_URL = 'https://cm.xyyxt.net/'  //release-祥粤学堂
+// export const WEBVIEW_URL = 'https://cm.xyyxt.net/'  //release-祥粤学堂
 // export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
-// export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境-祥粤云学堂
+export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境-祥粤云学堂
 // export const WEBVIEW_URL = 'http://120.79.166.78:18011/' // 测试环境-祥粤学堂  
 // export const WEBVIEW_URL = 'http://api.xyyxt.net:6066/'  //预发布(弃用了)
 
@@ -37,7 +37,7 @@ hF6WiNlWfQTVoF1rhwIDAQAB
 -----END PUBLIC KEY-----`;
 
 export const version = '1.0.2' 
-export const tenantId = '667735392758919630'  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630
+export const tenantId = '867735392558919680'  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {
 		uni.showLoading({

+ 1 - 1
components/course/courseChapter.vue

@@ -662,7 +662,7 @@ export default {
               }
             });
             self.list = res.data.data;
-            console.log('=======节列表==', this.list);
+            // console.log('=======节列表==', this.list);
           }
         });
     },

+ 1 - 1
manifest.json

@@ -75,7 +75,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx871153afc95f55f4", // 祥粤云学堂:wxd3c8ae80cf43a305
+        "appid" : "wxd3c8ae80cf43a305", // 祥粤云学堂:wxd3c8ae80cf43a305, 祥粤学堂-wx871153afc95f55f4
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,

+ 29 - 13
pages3/polyv/detail.vue

@@ -775,6 +775,7 @@ export default {
       prendreAutoCarme: false, // 是否发起授权相机
       studyTimer: null, // 学习记录定时器
       CountTo: 30, // 倒计时
+      handoutTipLength: 0,
       menuAllList: [],
       popupPhotoShow: false,
       curPlayIndex: 0, // 正在播放的节的下标
@@ -992,7 +993,7 @@ export default {
             this.goodsTeacher.push(data)
           }) 
         }
-        console.log(this.goodsTeacher,'this.goodsTeacher', this.courseId);
+        // console.log(this.goodsTeacher,'this.goodsTeacher', this.courseId);
         this.goodsTeacher.forEach((item) => {
           if(item.courseList.some(x => x.courseId == this.courseId)){
             this.teacherList = item.teaList
@@ -1361,12 +1362,18 @@ export default {
     noticeConfirm() {
       if (this.CountTo < 0) {
         this.noticeShow = false
+        if (this.handoutTipLength == 0 && this.goodsPlayConfig.autoPlay > 0) {
+          this.autoplay = true
+          var polyvPlayerContext = this.selectComponent("#playerVideo")
+          polyvPlayerContext.play()
+        }
       }
     },
 		baseHandoutTipList() {
 			this.$api.baseHandoutTipList({
 				orderGoodsId:this.orderGoodsId
 			}).then(res => {
+        this.handoutTipLength = res.data.rows.length
 				if(res.data.rows.length == 0) {
 					this.noticeShow = true;
           if (this.CountTo == 30) {
@@ -1379,6 +1386,11 @@ export default {
           }
 				} else {
           this.CountTo = -1
+          if (this.goodsPlayConfig.autoPlay > 0) {
+            this.autoplay = true
+            var polyvPlayerContext = this.selectComponent("#playerVideo")
+            polyvPlayerContext.play()
+          }
         }
 			})
 		},
@@ -1871,6 +1883,7 @@ export default {
               self.photoHistoryList.push(res.data.data[i].photoIndex);
             }
           }
+          // console.log('7777', this.photoHistoryList, this.photoList);
         }
       });
     },
@@ -1999,7 +2012,7 @@ export default {
           // console.log(this.photoList, "随机拍照时间数组11", photoNum);
           this.postCoursePhotoRecord(true); //提交随机拍照时间数组
         }
-        // console.log(this.photoList, "随机拍照时间数组");
+        
         //兼容已有观看历史
         for (let i = 0; i < this.photoList.length - 1; i++) {
           if (
@@ -2576,7 +2589,7 @@ export default {
       var polyvPlayerContext = this.selectComponent("#playerVideo");
       if (polyvPlayerContext != null) {
         this.playTime = polyvPlayerContext.getCurrentTime(); //播放时刻
-        // console.log('拍照啊', 789, this.photoHistoryList, 'this.photoList:', this.photoList)
+        console.log(789, this.photoHistoryList, 'this.photoList:', this.photoList, 'photoNum:', this.photoNum, 'playTime:', this.playTime)
         //判断是否需要拍照
         if (this.photoNum > 0) {
           this.configPhoto();
@@ -2721,6 +2734,9 @@ export default {
                 this.$store.commit("setPlaySectionId", { playSectionId: data.sectionId })
                 this.$store.commit("setPlayVID", { playVID: data.recordingUrl })
 
+                this.hasStart = false;
+                this.photoConfig = false;
+                this.photoIndex = 0;
                 this.sectionItem = data;
                 await this.getPhotoLastRecord() // 获取拍照历史
                 this.playVideo(data)
@@ -2773,11 +2789,11 @@ export default {
           position: 0,
           success: (res) => {
             let base64 = "data:image/jpg;base64," + res.data;
-						console.log('base64Data人脸识别参数:', {
-              imageA: base64,
-              orderGoodsId: this.orderGoodsId,
-              gradeId: this.gradeId,
-            })
+						// console.log('base64Data人脸识别参数:', {
+            //   imageA: base64,
+            //   orderGoodsId: this.orderGoodsId,
+            //   gradeId: this.gradeId,
+            // })
             
             let timer = setTimeout(() => {
               uni.showToast({
@@ -2832,7 +2848,7 @@ export default {
       this.uploadLock = true;
 
       let compareFaceData = await this.faceRecognition();
-			console.log(compareFaceData,'compareFaceData')
+			// console.log(compareFaceData,'compareFaceData')
       this.compareFaceData = compareFaceData
       if (compareFaceData >= 80) {
         const waitYS = await this.imageInfos();
@@ -2946,9 +2962,9 @@ export default {
         this.getNoteList();
         if (self.goodsData.goodsPlayConfig) {
           self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
-          if (self.goodsPlayConfig.autoPlay > 0) {
-            self.autoplay = true;
-          }
+          // if (self.goodsPlayConfig.autoPlay > 0) {
+          //   self.autoplay = true;
+          // }
           if (self.goodsPlayConfig.drag > 0) {
             self.isAllowSeek = "yes";
           }
@@ -3090,7 +3106,7 @@ export default {
                 
               }
             }
-            console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
+            // console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
           }
         });
     },