diff --git a/pages/gymnasium/index.js b/pages/gymnasium/index.js index 8323e69..faebac7 100644 --- a/pages/gymnasium/index.js +++ b/pages/gymnasium/index.js @@ -3,6 +3,7 @@ const app = getApp(); import { getCurrentPageUrl } from './../../utils/util.js' +let id = '' Page({ /** @@ -23,11 +24,18 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function(options) { + if (options.id) { + id = options.id; + } + + if (options.scene) { + id = options.scene; + } wx.showLoading({ title: '加载中...', }) app.$api.venueDetail({ - venueId: options.id + venueId: id }).then(res => { this.setData({ venues: res.venues