const app = getApp() import { showroomListRq } from "../../../../api/meeting/exhibition.js" Page({ /** * 页面的初始数据 */ data: { IMG_NAME: app.IMG_NAME, dataList: [], }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { // 页面初始化 options为页面跳转所带来的参数 wx.setNavigationBarTitle({ title: options.name }) // 初始化数据 this.initData(); }, // 初始化数据 initData() { let _this = this; // 获取数据 this.getDateList() }, // 获取数据 getDateList() { let _this = this; // 列表数据 showroomListRq().then(res => { console.log('showroomListRq', res); _this.setData({ dataList: res.data }) }) }, // 跳转-详情 jumpDetail(e) { console.log('jumpDetail', e); wx.navigateTo({ url: "/pages/meeting/exhibition/detail/detail?id=" + e.currentTarget.dataset.id, }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })