const app = getApp() var util = require("../../../utils/util.js") Page({ data: { imgUrl: '', id: '' }, onLoad: function(options) { this.setData({ id: options.id, navH: app.globalData.navHeight }) this.getImg() }, getImg() { util.postData('/college/queryRedeem', { presentId: this.data.id }).then(res => { this.setData({ imgUrl: res.detail_img_href }) }) }, toPage() { app.checkSession().then(res => { wx.navigateTo({ url: '/pages/scholarship/exchange/exchange?id=' + this.data.id }) }) } })