xuqiaoying 3 년 전
부모
커밋
d6ff76b4da
1개의 변경된 파일12개의 추가작업 그리고 4개의 파일을 삭제
  1. 12 4
      pages3/polyv/detail.vue

+ 12 - 4
pages3/polyv/detail.vue

@@ -2195,6 +2195,7 @@ export default {
     },
     getCameraSetting() {
       const self = this;
+      // 不支持h5
       wx.getSetting({
         success: (res) => {
           if (res.authSetting["scope.camera"]) {
@@ -2634,6 +2635,7 @@ export default {
             let canvasWidth = res.width; //图片原始长宽
             let canvasHeight = res.height;
             if (canvasWidth > 2000 || canvasHeight > 2000) {
+              // h5不支持
               uni.compressImage({
                 src: self.avatarUrl,
                 quality: 75,
@@ -2681,7 +2683,7 @@ export default {
         // #ifdef H5
         this.playTime = polyvPlayerContext.j2s_getCurrentTime()
         // #endif
-        // console.log(789, this.photoHistoryList, 'this.photoList:', this.photoList, 'photoNum:', this.photoNum, 'playTime:', this.playTime)
+        console.log(789, this.photoHistoryList, 'this.photoList:', this.photoList, 'photoNum:', this.photoNum, 'playTime:', this.playTime)
         //判断是否需要拍照
         if (this.photoNum > 0) {
           this.configPhoto();
@@ -2865,6 +2867,7 @@ export default {
 
     //拍照
     openPhoto() {
+      console.log('开始拍照');
       // var polyvPlayerContext = this.selectComponent("#playerVideo");
       if (polyvPlayerContext) {
         // #ifdef MP-WEIXIN
@@ -2880,9 +2883,11 @@ export default {
       this.enableAutoRotation = false;
       this.photoPopup = true;
       this.isTaking = true;
+      // 设置是否保持常亮状态 ,h5不支持
       uni.setKeepScreenOn({
         keepScreenOn: true,
       });
+      // h5不支持
       uni.authorize({
         scope: "scope.camera",
         success() {},
@@ -2893,6 +2898,7 @@ export default {
      */
     faceRecognition() {
       return new Promise((resolve) => {
+        // 不确定h5
         let fileSystem = uni.getFileSystemManager();
         fileSystem.readFile({
           filePath: `${this.avatarUrl}`,
@@ -2969,7 +2975,7 @@ export default {
             // console.log('拍照确定提交', this.photoHistoryList);
             this.postStudyRecord(); //提交记录
             //恢复播放
-
+            // h5不支持
             uni.setKeepScreenOn({
               keepScreenOn: false,
             });
@@ -3023,6 +3029,7 @@ export default {
     //确认拍照
     takePhoto() {
       var self = this;
+      // h5不支持
       const ctx = uni.createCameraContext();
       ctx.takePhoto({
         quality: "high",
@@ -3100,7 +3107,7 @@ export default {
           );
           if (self.goodsPhotographConfig.photoNum > 0) {
             self.photoNum = self.goodsPhotographConfig.photoNum;
-            // console.log(self.photoNum, 777777);
+            console.log(self.photoNum, 777777);
           }
         }
       });
@@ -3268,10 +3275,12 @@ export default {
     openDocument() {
       this.downLoading = true
       let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl);
+      // 不确定h5
       uni.downloadFile({
         url: url,
         success: (res) => {
           var filePath = res.tempFilePath;
+          // h5不支持
           uni.openDocument({
             filePath: filePath,
             showMenu: this.courseHandoutsData.canDownload == 1 ? true : false,
@@ -3302,7 +3311,6 @@ export default {
       this.muluStyle = !this.muluStyle
     },
     loadPlayerScript(callback) {
-      console.log( 'window.polyvPlayer:', window.polyvPlayer);
       if (!window.polyvPlayer) {
         const myScript = document.createElement("script");
         myScript.setAttribute("src", this.vodPlayerJs);