forked from nsjcy/frontEnd/nsjcy

1
liuwh
2020-03-23 ed96dab91fbac7159525fe557af2ecdd135c791d
SunshineLnsMinApp/pages/messageNotification/messageNotification.js
@@ -6,7 +6,7 @@
   * 页面的初始数据
   */
  data: {
    loading: app.globalData.imgUrl +'/image/loading.svg',
    loading: app.globalData.imgUrl + '/image/loading.svg',
    navbar: ['全部', '未回复', '已回复'],
    currentTab: 0,
    size: 10,
@@ -18,7 +18,7 @@
    dataSet: []
  },
  navbarTap: function(e) {
  navbarTap: function (e) {
    this.setData({
      currentTab: e.currentTarget.dataset.idx
    })
@@ -26,7 +26,7 @@
  },
  showList: function(tab) {
  showList: function (tab) {
    var userinfo = wx.getStorageSync("user");
    var that = this;
    var id = userinfo.id
@@ -48,16 +48,16 @@
    }
    wx.request({
      url: app.globalData.url + '/api/businessAggr/draftQuery?page=1&size=' + that.data[sizeQty] + '&userId=' + id + '&flag=message' + str,
      success: function(res) {
      success: function (res) {
        if (res.data.code == 0) {
          (res.data.data.content).forEach(e => {
            (e.createTime) = app.formatDate(e.createTime)
            switch (e.businessType) {
              case '扫黑除恶':
                e.iconSrc = app.globalData.imgUrl +'/image/businessManage/saoheichue_b.png';
                e.iconSrc = app.globalData.imgUrl + '/image/businessManage/saoheichue_b.png';
                break;
              case '公益随手拍':
                e.iconSrc = app.globalData.imgUrl +'/image/businessManage/suishoupai_b.png';
                e.iconSrc = app.globalData.imgUrl + '/image/businessManage/suishoupai_b.png';
                break;
              case '联络站':
                if (e.stationType == 4) {
@@ -80,7 +80,7 @@
                e.iconSrc = app.globalData.imgUrl + '/image/icon_lianluo.svg';
                break;
              case '投诉建议':
                e.iconSrc = app.globalData.imgUrl +'/image/businessManage/icon_tousujianyi@2x.png'
                e.iconSrc = app.globalData.imgUrl + '/image/businessManage/icon_tousujianyi@2x.png'
            }
@@ -109,7 +109,7 @@
    })
  },
  businessSchedule: function(event) {
  businessSchedule: function (event) {
    var id = event.currentTarget.id;
    var businessType = this.data.dataSet[id].businessType;
    var businessId = this.data.dataSet[id].businessId;
@@ -128,9 +128,13 @@
      wx.navigateTo({
        url: '../complaintAdvice/complaintAdvice?id=' + businessId,
      })
    } else if (businessType1 == "联络站") {
    } else if (businessType == "联络站") {
      wx.navigateTo({
        url: '../junctionStation/junctionStation?id=' + businessId + '&flag=' + flag,
      })
    } else if (businessType == "普法预约") {
      wx.navigateTo({
        url: '../pfyy/pfyy?id=' + businessId + '&disabled=' + true,
      })
    } else {
      wx.showModal({
@@ -140,14 +144,14 @@
    }
  },
  onLoad: function() {
  onLoad: function () {
    this.showList(0)
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {
  onReachBottom: function () {
    if (this.data.hasMoreData) {
      this.showList(this.data.currentTab)
      this.setData({