// index.js import { ajax } from "../../utils/util"; Page({ data: { ori: {}, video_height: 0, }, toNext(e){ const item = e.currentTarget.dataset.item || {}; if (item.type === 'gzh'){ wx.navigateTo({ url: "/pages/webview/index?url=" + item.url }) return } if (item.type === 'sph'){ wx.openChannelsActivity({ finderUserName: item.sph_id, feedId: item.sp_id, }) return } }, onLoad(options) { ajax({ urlType: "fileurl", api: "/topic/tool/img/%E5%B0%91%E5%84%BF%E4%B9%A6%E7%94%BB%E5%A4%A7%E8%B5%9B/home.json?data=" + Date.now() }).then(res => { this.setData({ ori: res || {} }) }) } })