import { getStationInfo } from "../../../api/ztb" const util = require('../../../utils/util') const app = getApp() Page({ data: { height: app.globalData.fragmentHeight, factoryInfo: null }, onLoad: function (options) { if(options.id){ wx.showLoading({ title: '正在处理', mask: true }) var params = {factoryId: options.id} if(app.nowLocation){ params.personalLatitude = app.nowLocation.latitude params.personalLongitude = app.nowLocation.longitude } getStationInfo(params).then(result => { this.setData({factoryInfo: result.data, height: app.globalData.fragmentHeight}) wx.hideLoading() }).catch(err => { wx.hideLoading() util.showToast(err) }) } } })