publisherDetail.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. const util = require('../../utils/util.js')
  2. Page({
  3. data: {
  4. publisherInfo: [],
  5. mainDatas: [],
  6. },
  7. // processData: function (start, arr) {
  8. // for (let i = start; i < arr.length; i++) {
  9. // arr[i].time = util.handleDate(arr[i].time)
  10. // }
  11. // this.setData({
  12. // mainDatas: arr
  13. // })
  14. // wx.hideLoading()
  15. // },
  16. // onLoad: function (options) {
  17. // wx.showLoading({
  18. // title: "加载中"
  19. // })
  20. // const db = wx.cloud.database()
  21. // db.collection("publisherInfoData").doc(options.id).get({
  22. // success: function (res) {
  23. // this.setData({
  24. // publisherInfo: res.data
  25. // })
  26. // db.collection("mainData").where({
  27. // publisherName: this.data.publisherInfo.publisherName
  28. // }).orderBy("time", "desc").limit(20).get({
  29. // success: function (res) {
  30. // this.processData(0, res.data)
  31. // }.bind(this)
  32. // })
  33. // }.bind(this)
  34. // })
  35. // db.collection("likeData").where({
  36. // type: "publisher",
  37. // id: options.id
  38. // }).get({
  39. // success: function (res) {
  40. // this.setData({
  41. // like: res.data.length
  42. // })
  43. // }.bind(this)
  44. // })
  45. // },
  46. })