const util = require('../../utils/util.js') Page({ data: { publisherInfo: {}, }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { wx.showLoading({ title: "加载中" }) wx.cloud.callFunction({ name: 'getPublisher', data: { pub_id: options.id } }).then(res => { wx.hideLoading() if (res.result.status !== 'OK') { wx.showToast({ title: res.result.errMsg, icon: 'none' }) return } this.setData({ publisherInfo: res.result.data }) }) } })