info.js 554 B

12345678910111213141516171819202122232425262728293031323334353637
  1. const app = getApp()
  2. var util = require("../../../utils/util.js")
  3. Page({
  4. data: {
  5. imgUrl: '',
  6. id: ''
  7. },
  8. onLoad: function(options) {
  9. this.setData({
  10. id: options.id,
  11. navH: app.globalData.navHeight
  12. })
  13. this.getImg()
  14. },
  15. getImg() {
  16. util.postData('/college/queryRedeem', {
  17. presentId: this.data.id
  18. }).then(res => {
  19. this.setData({
  20. imgUrl: res.detail_img_href
  21. })
  22. })
  23. },
  24. toPage() {
  25. app.checkSession().then(res => {
  26. wx.navigateTo({
  27. url: '/pages/scholarship/exchange/exchange?id=' + this.data.id
  28. })
  29. })
  30. }
  31. })