|
@ -81,8 +81,9 @@ Page({ |
|
|
signMsg: '', |
|
|
signMsg: '', |
|
|
signCode: 0, |
|
|
signCode: 0, |
|
|
isSignUp: 0, |
|
|
isSignUp: 0, |
|
|
yjfwPID: '', //一键服务pid
|
|
|
yjfw: {}, |
|
|
jmjsPID: '', //解码锦水pid
|
|
|
jmjs: {}, |
|
|
|
|
|
sxjs: {}, |
|
|
}, |
|
|
}, |
|
|
onShow: function () { |
|
|
onShow: function () { |
|
|
if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) { |
|
|
if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) { |
|
@ -99,6 +100,7 @@ Page({ |
|
|
newsList: [] |
|
|
newsList: [] |
|
|
}) |
|
|
}) |
|
|
this.getNewsList() |
|
|
this.getNewsList() |
|
|
|
|
|
this.getModuleList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -186,14 +188,6 @@ Page({ |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
zyzqnGridId:item.residentValue |
|
|
zyzqnGridId:item.residentValue |
|
|
}) |
|
|
}) |
|
|
} else if (item.residentType === 'module_category' && item.residentCode === 'module_category_yjfw') { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
yjfwPID:item.residentValue |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (item.residentType === 'module_category' && item.residentCode === 'module_category_jmjs') { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
jmjsPID:item.residentValue |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -278,6 +272,36 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
getModuleList: function () { |
|
|
|
|
|
let params = { |
|
|
|
|
|
pageIndex: 1, |
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
pid: '0' |
|
|
|
|
|
} |
|
|
|
|
|
api.moduleCategory(params).then(res => { |
|
|
|
|
|
console.log('获取模块列表',res.data) |
|
|
|
|
|
res.data.forEach( item => { |
|
|
|
|
|
if (item.categoryCode == 'sxjs') { |
|
|
|
|
|
this.data.sxjs = { ...item } |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
sxjs: this.data.sxjs |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (item.categoryCode == 'jmjs') { |
|
|
|
|
|
this.data.jmjs = { ...item } |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
jmjs: this.data.jmjs |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (item.categoryCode == 'yjfw') { |
|
|
|
|
|
this.data.yjfw = { ...item } |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
yjfw: this.data.yjfw |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
onReachBottom () { |
|
|
onReachBottom () { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
loadMoreVisible: true |
|
|
loadMoreVisible: true |
|
@ -427,6 +451,7 @@ Page({ |
|
|
that.getNewsList() |
|
|
that.getNewsList() |
|
|
that.getIssueList() |
|
|
that.getIssueList() |
|
|
that.getProjectList() |
|
|
that.getProjectList() |
|
|
|
|
|
that.getModuleList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -454,10 +479,16 @@ Page({ |
|
|
currentIndex: e.detail.current |
|
|
currentIndex: e.detail.current |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
//跳转到 书香锦水 页面
|
|
|
|
|
|
toSxjs () { |
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: `/subpages/oneKeyService/pages/moduleList/moduleList?pid=${this.data.sxjs.id}&bannerflag=${this.data.sxjs.bannerFlag}&categorycode=${this.data.sxjs.categoryCode}&modulestyle=${this.data.sxjs.moduleStyle}&categoryname=${this.data.sxjs.categoryName}` |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
//跳转到 一键服务页面(新) 2020.07.15
|
|
|
//跳转到 一键服务页面(新) 2020.07.15
|
|
|
toOneKeyService () { |
|
|
toOneKeyService () { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.yjfwPID}&title=一键服务` |
|
|
url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.yjfw.id}&title=一键服务` |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 点击-更多,跳转通知列表
|
|
|
// 点击-更多,跳转通知列表
|
|
@ -477,7 +508,7 @@ Page({ |
|
|
//了解锦水
|
|
|
//了解锦水
|
|
|
toUnderstandJs (){ |
|
|
toUnderstandJs (){ |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.jmjsPID}&title=解码锦水` |
|
|
url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.jmjs.id}&title=解码锦水` |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -739,7 +770,7 @@ Page({ |
|
|
let params = { |
|
|
let params = { |
|
|
pageIndex: page, |
|
|
pageIndex: page, |
|
|
pageSize: 10, |
|
|
pageSize: 10, |
|
|
pid: this.data.yjfwPID |
|
|
pid: this.data.yjfw.id |
|
|
} |
|
|
} |
|
|
let op = {} |
|
|
let op = {} |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|