// 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.navigateTo({ url: "/pages/sph/index?sph_id=" + item.sph_id + "&sp_id=" + item.sp_id }) // wx.openChannelsActivity({ // finderUserName: item.sph_id, // feedId: item.sp_id, // }) return } }, onLoad(options) { // console.log(__wxConfig.accountInfo.icon) // 小程序icon 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 || {} }) }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })