|
@@ -149,7 +149,10 @@ Page({
|
|
|
}
|
|
|
],
|
|
|
// 意见征集list
|
|
|
- yjzjDataList: [],
|
|
|
+ yjzjDataList: [],
|
|
|
+ // 在线调查
|
|
|
+ investigatePage: 1,
|
|
|
+ investigateList: [],
|
|
|
// 地图服务
|
|
|
mapServiceData: [{
|
|
|
id: 1,
|
|
@@ -435,8 +438,11 @@ Page({
|
|
|
// 获取本年办件数
|
|
|
this.getOfficeNumberByAreaInfo();
|
|
|
// 意见征集数据
|
|
|
- this.yjzjData()
|
|
|
+ this.yjzjData()
|
|
|
+ // 初始化在线调查page
|
|
|
this.setData({
|
|
|
+ investigatePage: 1,
|
|
|
+ investigateList: [],
|
|
|
navHeight: app.globalData.navHeight + app.globalData.menuHeight / 2
|
|
|
})
|
|
|
|
|
@@ -787,7 +793,10 @@ Page({
|
|
|
communicateChangeTab: function (e) {
|
|
|
this.setData({
|
|
|
communicateTab: e.detail.current
|
|
|
- })
|
|
|
+ })
|
|
|
+ if (this.data.communicateTab == 1) {
|
|
|
+ this.getInvestigation(false)
|
|
|
+ }
|
|
|
},
|
|
|
// 意见征集接口
|
|
|
yjzjData() {
|
|
@@ -804,7 +813,48 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
+ },
|
|
|
+ // 获取在线调查列表
|
|
|
+ getInvestigation(flag) {
|
|
|
+ wx.showToast({title: '加载中',icon: 'loading',duration: 1500})
|
|
|
+ var data = []
|
|
|
+ wx.request({
|
|
|
+ url: `https://www.cqna.gov.cn/IGI/open/survey/list?siteId=254&pageIndex=${this.data.investigatePage}&pageSize=10&orderBy=startTime_desc`,
|
|
|
+ method: 'GET',
|
|
|
+ success: res => {
|
|
|
+ data = res.data.datas.data
|
|
|
+ if (data && data.length > 0) {
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ data[i].startTime = this.formatDateNumber(new Date(data[i].startTime * 1))
|
|
|
+ data[i].endTime = this.formatDateNumber(new Date(data[i].endTime * 1))
|
|
|
+ }
|
|
|
+ data = this.data.investigateList.concat(data)
|
|
|
+ this.setData({
|
|
|
+ 'investigateList': data,
|
|
|
+ 'investigatePage': this.data.investigatePage + 1
|
|
|
+ })
|
|
|
+ wx.hideToast();
|
|
|
+ } else {
|
|
|
+ wx.hideToast();
|
|
|
+ // 下拉刷新会提示加载完成
|
|
|
+ if (flag) {
|
|
|
+ wx.showToast({title: '已加载全部数据',icon: 'success',duration: 1000})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 在线调查触底
|
|
|
+ investigationScrollBottom(e) {
|
|
|
+ this.getInvestigation(true)
|
|
|
+ },
|
|
|
+ goToInvestigationDetail(e) {
|
|
|
+ const id = e.target.dataset.id
|
|
|
+ const siteId = e.target.dataset.siteid
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/web/web?wxUrl=' + encodeURIComponent(`https://www.cqna.gov.cn/personalCenter/answerSheet/answerSheet.html?siteId=${siteId}&metadataId=${id}`),
|
|
|
+ })
|
|
|
+ },
|
|
|
goYjzjDetail(e) {
|
|
|
var html = e.currentTarget.dataset.item
|
|
|
wx.navigateTo({
|