const util = require('../../utils/util.js') Page({ data: { publisherInfo: [], mainDatas: [], }, // processData: function (start, arr) { // for (let i = start; i < arr.length; i++) { // arr[i].time = util.handleDate(arr[i].time) // } // this.setData({ // mainDatas: arr // }) // wx.hideLoading() // }, // onLoad: function (options) { // wx.showLoading({ // title: "加载中" // }) // const db = wx.cloud.database() // db.collection("publisherInfoData").doc(options.id).get({ // success: function (res) { // this.setData({ // publisherInfo: res.data // }) // db.collection("mainData").where({ // publisherName: this.data.publisherInfo.publisherName // }).orderBy("time", "desc").limit(20).get({ // success: function (res) { // this.processData(0, res.data) // }.bind(this) // }) // }.bind(this) // }) // db.collection("likeData").where({ // type: "publisher", // id: options.id // }).get({ // success: function (res) { // this.setData({ // like: res.data.length // }) // }.bind(this) // }) // }, })