| | |
| | | onLoad() { |
| | | const res = wx.getMenuButtonBoundingClientRect() |
| | | this.setData({ |
| | | clientHeight: res.height |
| | | }) |
| | | this.setData({ |
| | | clientHeight: res.height, |
| | | clientTop: res.top |
| | | }) |
| | | |
| | | }, |
| | | onShow() { |
| | | this.initData() |
| | | }, |
| | | initData() { |
| | |
| | | const { |
| | | videourl |
| | | } = e.currentTarget.dataset |
| | | wx.previewMedia({ |
| | | sources: [{ |
| | | url: videourl, |
| | | type: 'video' |
| | | }] |
| | | }) |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if(videoPlay){ |
| | | videoPlay.startPlayVideo(videourl,this ); |
| | | } |
| | | // wx.previewMedia({ |
| | | // sources: [{ |
| | | // url: videourl, |
| | | // type: 'video' |
| | | // }] |
| | | // }) |
| | | }, |
| | | seriveClick(e) { |
| | | const { |