// 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) { const index = e.currentTarget.dataset.index let o = this.data.list[index] wx.navigateTo({ url: '/pages/playShow/playShow?vid='+o.videoId, }) } }, })