From 1a6905045d38bb50b0c6554c3440bdfd339c8d23 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 30 七月 2024 19:13:46 +0800
Subject: [PATCH] ‘’

---
 wechat_staff/components/disRealpic/index.js |   35 ++++++++++++++---------------------
 1 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/wechat_staff/components/disRealpic/index.js b/wechat_staff/components/disRealpic/index.js
index 8ffbc56..46e5615 100644
--- a/wechat_staff/components/disRealpic/index.js
+++ b/wechat_staff/components/disRealpic/index.js
@@ -73,9 +73,10 @@
     },
     videoClick(e) {
       const { videourl } = e.currentTarget.dataset
-      wx.previewMedia({
-        sources: [{ url: videourl, type: 'video' }]
-      })
+      let videoPlay = this.selectComponent('.videoPlay'); 
+      if(videoPlay){ 
+        videoPlay.startPlayVideo(videourl,this );
+      } 
     },
     priviewFull(e){
       const item = e.currentTarget.dataset.item
@@ -108,9 +109,10 @@
       const item = e.currentTarget.dataset.item
       console.log('item', item);
       if(item.openType == 'video'){
-        wx.previewMedia({
-          sources: [{ url: item.openContent, type: 'video' }]
-        })
+        let videoPlay = this.selectComponent('.videoPlay'); 
+        if(videoPlay){ 
+          videoPlay.startPlayVideo(item.openContent,this );
+        } 
       }
       if(item.openType == 'link'){
         wx.navigateTo({
@@ -133,28 +135,19 @@
       }
       const code = e.currentTarget.dataset.code
       const paramIndex = e.currentTarget.dataset.index
-      const { cateList, tagCodes, activeParam, activeIndex } = this.data
-      const index = tagCodes.indexOf(code)
-      
-      if(index === -1){
-        // if(activeParam && activeParam.length > 0){
-        //   activeParam.forEach(item => {
-        //     const indexTemp = tagCodes.indexOf(item.labelValueCode)
-        //     if(indexTemp > -1){
-        //       tagCodes.splice(indexTemp, 1)
-        //     }
-        //   })
-        // }
-        // tagCodes.push(code)
+      const { cateList, tagCodes, activeParam, activeIndex } = this.data 
+      if(   cateList[activeIndex].tempParamIndex==null ||     cateList[activeIndex].tempParamIndex != paramIndex){ 
         cateList[activeIndex].tempParamIndex = paramIndex
         cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
         cateList[activeIndex].tempParamCode = code
+        console.log(code)
       }else{
         cateList[activeIndex].tempParamIndex = -1
         cateList[activeIndex].tempParamName = null
-        cateList[activeIndex].tempParamCode = null
+        cateList[activeIndex].tempParamCode = null 
+        console.log(1)
       }
-      this.setData({  cateList })
+      this.setData({  cateList }) 
     },
     cancelParam() {
       const { cateList } = this.data

--
Gitblit v1.9.3