aa
jiangping
2024-08-02 3eea1a1f81423b80bfd6d5f5f29874988547f1a2
wechat_jiaxuan/pages/productVideo/index.js
@@ -1,4 +1,4 @@
import { getZhongTaiVideoPage, getCataLogTagList } from '../../api/index'
import { getZhongTaiVideoPage, actionDo, getCataLogTagList } from '../../api/index'
Page({
  /**
@@ -50,9 +50,23 @@
    })
  },
  itemClick(e) {
    const { videourl } = e.currentTarget.dataset
    this.startPlayVideo(videourl)
    const { videourl ,id} = e.currentTarget.dataset.item
    const { dataList } = this.data
    dataList.forEach(ite => {
      if(id === ite.id){
        ite.viewCount += 1
      }
    })
    this.setData({ dataList })
    actionDo({
      actionType: 'view',
      id: id
    })
    // let videoPlay = this.selectComponent('.videoPlay');
    // if(videoPlay){
    //   videoPlay.startPlayVideo(videourl,this );
    // }
    // this.startPlayVideo(videourl)
    // wx.previewMedia({
    //   sources: [{ url: videourl, type: 'video' }]
    // })
@@ -69,8 +83,8 @@
  },
  onLoad(options) {
    this.getTagList()
    this.getList()
    this.videoContext = wx.createVideoContext('myVideo')
    this.getList()
    this.videoContext = wx.createVideoContext('myVideo')
  },
  /**