const api = require("../../utils/request"); Page({ /** * 页面的初始数据 */ data: { results: [], query: { page: 1, limit: 10, type:'视频' } }, onLoad: function () { var that = this that.getList(that.data.query) }, getList: function () { var that = this api.request('/cms/material/', 'GET', that.data.query).then(res => { console.log(that.data.results) for(var i=0;i{ }).catch(e=>{}) }, pause:function(e){ let index = e.currentTarget.dataset.index this.data.results[index].showTitle=true this.setData({ results:this.data.results }) }, })