1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- // pages/Component/showList/showList.js
- const util = require("../../../utils/util")
- const urlDef = require("../../../utils/urls")
- Component({
- lifetimes:{
- attached:function(){
-
- }
- },
- /**
- * 组件的属性列表
- */
- properties: {
- list: {
- type: Array,
- value: []
- },
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- /**
- * 组件的方法列表
- */
- methods: {
- doThumbsUp: function (e) {
- let id = e.currentTarget.dataset.id
- this.properties.list.map(o => {
- if (o.videoId == id) {
- this.triggerEvent('callThumbsUp', o)
- }
- })
- },
- doPlay: function (e) {
- let playUrl = e.currentTarget.dataset.url
- const index = e.currentTarget.dataset.index
- const str = JSON.stringify(this.data.list[index])
- wx.navigateTo({
- url: '/pages/playShow/playShow?str='+str,
- })
- }
- },
- })
|