riku
2022-08-23 8fbd6b8d09e70494d920cc0b77812e9643be3196
pages/module_consult/consulthome/consulthome.js
@@ -10,7 +10,28 @@
   */
  data: {
    searchTips: '请输入关键字搜索',
    hotTopics: []
    hotTopics: [],
    tabList: [{
      name: '热门',
      tag: 0
    }, {
      name: '文件',
      tag: 0
    }, {
      name: '条目',
      tag: 0
    }, {
      name: '案例',
      tag: 0
    }],
    pageList: [
      [],
      [],
      [],
      [],
    ]
  },
  /**
@@ -82,7 +103,8 @@
          r.mfClosingDate = that.formateTime(r.mfClosingDate)
        });
        that.setData({
          hotTopics: res
          'pageList[0]': res,
          'pageList[1]': res
        })
      }
    })
@@ -90,7 +112,7 @@
  gotoDetail(e) {
    var i = e.currentTarget.dataset.index
    var fileId = this.data.hotTopics[i].mfGuid
    var fileId = this.data.pageList[0][i].mfGuid
    wx.navigateTo({
      url: '/pages/module_consult/consultdetail/consultdetail',
      success: (res) => {
@@ -102,9 +124,9 @@
    })
  },
  formateTime (t) {
  formateTime(t) {
    if (t) {
      return moment(t).format("YYYY年MM月DD日")
      return moment(t).format("YYYY年MM月DD日")
    } else {
      return undefined
    }