const app = getApp() var WxParse = require('../../wxParse/wxParse'); Page({ /** * 页面的初始数据 */ data: { id: '', dinfo: '', dlist: [], manage: false }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { this.setData({ id: options.id }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { this.getinfo(); }, getinfo() { var that = this; let id = that.data.id; let uid = app.globalData.openid; wx.request({ url: app.data.resturl + '/gginfo.action', method: 'post', header: { 'content-type': 'application/x-www-form-urlencoded' }, data: { id: id }, success: function (res) { that.setData({ dinfo: res.data.dinfo }); } }) } })