diff --git a/epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.js b/epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.js index 120781b..17f810d 100644 --- a/epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.js +++ b/epdc-resident-mp-yushan/subpages/fingertipYushan/pages/index/index.js @@ -24,13 +24,12 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onLoad: async function (options) { // this.modulelist() // wx.setNavigationBarTitle({ // title: options.title // }) - this.getModuleList() - this.getNoticelist() + this.getModuleList() }, // modulelist() { // let that = this; @@ -53,8 +52,10 @@ Page({ this.setData({ modulelist: this.data.modulelist.concat(res.data), loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', - loadMoreVisible: res.data.length === this.data.pageSize ? false : true + loadMoreVisible: res.data.length === this.data.pageSize ? false : true, + typeId:res.data[0].id }) + this.getNoticelist() if (this.data.modulelist.length == 0) {//没有值 this.setData({ nodata: true, @@ -80,16 +81,15 @@ Page({ pageSize: this.data.pageSize, typeId: this.data.typeId, } + console.log(params); contentList(params).then(res => { let list = [ ...res.data ] - console.log(list) that.setData({ noticelist: that.data.noticelist.concat(list), loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', loadMoreVisible: res.data.length === that.data.pageSize ? false : true, preloadVisible: false }) - console.log(this.data.noticelist); if (that.data.noticelist.length == 0) { that.setData({ nodata: true, diff --git a/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.js b/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.js index 1a34b94..6318a2d 100644 --- a/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.js +++ b/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.js @@ -19,6 +19,7 @@ Page({ moduleInfo: { style:'4' }, + typeId:'' }, /** @@ -30,7 +31,6 @@ Page({ // title: options.title // }) this.getModuleList() - this.getNoticelist() }, // modulelist() { // let that = this; @@ -49,12 +49,13 @@ Page({ typeCode: this.data.typeCode } api.getModuleList(params).then(res => { - console.log(res.data) this.setData({ modulelist: this.data.modulelist.concat(res.data), + typeId:res.data[0].id, loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', loadMoreVisible: res.data.length === this.data.pageSize ? false : true }) + this.getNoticelist() if (this.data.modulelist.length == 0) {//没有值 this.setData({ nodata: true, diff --git a/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxml b/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxml index 4f54eaa..4ed57bd 100644 --- a/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxml +++ b/epdc-resident-mp-yushan/subpages/mediateHypermarket/page/index/index.wxml @@ -8,16 +8,16 @@ - + - + - +