publisherDetail.js 463 B

12345678910111213141516171819202122232425262728
  1. const util = require('../../utils/util.js')
  2. Page({
  3. data: {
  4. publisherInfo: {},
  5. },
  6. /**
  7. * 生命周期函数--监听页面加载
  8. */
  9. onLoad: function (options) {
  10. wx.showLoading({
  11. title: "加载中"
  12. })
  13. wx.cloud.callFunction({
  14. name: 'getPublisher',
  15. data: {
  16. pub_id: options.id
  17. }
  18. }).then(res => {
  19. wx.hideLoading()
  20. this.setData({
  21. publisherInfo: res.result.data
  22. })
  23. })
  24. }
  25. })