| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | loading: app.globalData.imgUrl +'/image/loading.svg', |
| | | loading: app.globalData.imgUrl + '/image/loading.svg', |
| | | navbar: ['全部', '未回复', '已回复'], |
| | | currentTab: 0, |
| | | size: 10, |
| | |
| | | dataSet: [] |
| | | }, |
| | | |
| | | navbarTap: function(e) { |
| | | navbarTap: function (e) { |
| | | this.setData({ |
| | | currentTab: e.currentTarget.dataset.idx |
| | | }) |
| | |
| | | |
| | | }, |
| | | |
| | | showList: function(tab) { |
| | | showList: function (tab) { |
| | | var userinfo = wx.getStorageSync("user"); |
| | | var that = this; |
| | | var id = userinfo.id |
| | |
| | | } |
| | | 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) { |
| | |
| | | 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' |
| | | } |
| | | |
| | | |
| | |
| | | }) |
| | | }, |
| | | |
| | | 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; |
| | |
| | | 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({ |
| | |
| | | } |
| | | }, |
| | | |
| | | onLoad: function() { |
| | | onLoad: function () { |
| | | this.showList(0) |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom: function() { |
| | | onReachBottom: function () { |
| | | if (this.data.hasMoreData) { |
| | | this.showList(this.data.currentTab) |
| | | this.setData({ |