xiebaomin 1 년 전
부모
커밋
058f81d7d5
1개의 변경된 파일59개의 추가작업 그리고 46개의 파일을 삭제
  1. 59 46
      pages/goods/components/cm-product-doc.vue

+ 59 - 46
pages/goods/components/cm-product-doc.vue

@@ -202,7 +202,8 @@ export default {
         this.userId = uni.getStorageSync('userInfo').userId || -1
         this.getDetail()
         this.userInfo = uni.getStorageSync('userInfo')
-        console.log(uni.getStorageSync('userInfo'))
+        console.log(uni.getStorageSync('userInfo'))
+        console.log(this.TipStatus, this.tipStatus)
     },
     methods: {
         // 获取商品资料详情
@@ -291,19 +292,19 @@ export default {
         },
         // 监听video时长
         onPlayVideo(e) {
-            console.log(e)
-            const allTime = parseInt((e.detail.duration % 3600) / 60) // 获取分钟
-            const inPlay = parseInt((e.detail.duration % 3600) / 60)
-            if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
-                if (allTime >= 10 && 3 < inPlay) {
-                    this.handleStop(e.target.id)
-                    this.checkPermission()
-                }
-                if (allTime < 10) {
-                    this.handleStop(e.target.id)
-                    this.checkPermission()
-                }
-            }
+            // console.log(e)
+            // const allTime = parseInt((e.detail.duration % 3600) / 60) // 获取分钟
+            // const inPlay = parseInt((e.detail.duration % 3600) / 60)
+            // if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
+            //     if (allTime >= 10 && 3 < inPlay) {
+            //         this.handleStop(e.target.id)
+            //         this.checkPermission()
+            //     }
+            //     if (allTime < 10) {
+            //         this.handleStop(e.target.id)
+            //         this.checkPermission()
+            //     }
+            // }
         },
         // 开始播放
         handelPlay(id) {
@@ -343,37 +344,48 @@ export default {
             if (info) {
                 this.GetStatisticsAddPv(1, info.archiveContentId)
             }
-            if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
-                if (previewImageList.length >= 5) {
-                    if (index < 2) {
-                        uni.previewImage({
-                            current: index,
-                            indicator: 'number',
-                            urls: previewImageList,
-                            loop: true,
-                            success() {
-                                that.$emit('previewImage', true)
-                            }
-                        })
-                    } else {
-                        if (this.checkPermission()) return
-                    }
-                } else {
-                    if (this.checkPermission()) return
-                }
-            } else {
-                if (this.checkPermission()) return
-                const that = this
-                uni.previewImage({
-                    current: index,
-                    indicator: 'number',
-                    urls: previewImageList,
-                    loop: true,
-                    success() {
-                        that.$emit('previewImage', true)
-                    }
-                })
-            }
+            // if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
+            //     if (previewImageList.length >= 5) {
+            //         if (index < 2) {
+            //             uni.previewImage({
+            //                 current: index,
+            //                 indicator: 'number',
+            //                 urls: previewImageList,
+            //                 loop: true,
+            //                 success() {
+            //                     that.$emit('previewImage', true)
+            //                 }
+            //             })
+            //         } else {
+            //             if (this.checkPermission()) return
+            //         }
+            //     } else {
+            //         if (this.checkPermission()) return
+            //     }
+            // } else {
+            //     if (this.checkPermission()) return
+            //     const that = this
+            //     uni.previewImage({
+            //         current: index,
+            //         indicator: 'number',
+            //         urls: previewImageList,
+            //         loop: true,
+            //         success() {
+            //             that.$emit('previewImage', true)
+            //         }
+            //     })
+            // }
+            if (this.checkPermission()) return
+            const that = this
+            uni.previewImage({
+                current: index,
+                indicator: 'number',
+                urls: previewImageList,
+                loop: true,
+                success() {
+                    that.$emit('previewImage', true)
+                }
+            })
         },
         //用户权限校验拦截
         checkPermission() {
@@ -448,7 +460,8 @@ export default {
             // if (this.checkPermission()) return
             // // 获取文件后缀
             // const index = file.fileName.lastIndexOf('.')
-            // const suffix = file.fileName.substring(index)
+            // const suffix = file.fileName.substring(index)
+            if (this.checkPermission()) return
             if (uni.getStorageSync('fileInfo')) {
                 uni.removeStorageSync('fileInfo')
             }