| | |
| | | data: { |
| | | active: 0, |
| | | activeName: "bookOpinion", |
| | | tabList: [ |
| | | { |
| | | tabList: [{ |
| | | label: '图书建议', |
| | | key: 0, |
| | | value: 'bookOpinion' |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | this.getDataList(false); |
| | | console.log(options) |
| | | }, |
| | | |
| | | /** |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | this.getDataList(false); |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | |
| | | }, |
| | | |
| | | tabBookClick(item) { |
| | | console.log(item, 1) |
| | | let that = this; |
| | | let info = this.data.tabList[item.detail.value] |
| | | that.setData({ |
| | |
| | | |
| | | getDataList(isReachBottom) { |
| | | app.MG.ugc.getTopicMessageList({ |
| | | appRefCode: app.config.appRefCode, |
| | | topicIdOrRefCode: this.data.topicIdOrRefCode, |
| | | start: this.data.page * this.data.limit - this.data.limit, |
| | | size: this.data.limit, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate" |
| | | } |
| | | }) |
| | | appRefCode: app.config.appRefCode, |
| | | topicIdOrRefCode: this.data.topicIdOrRefCode, |
| | | start: this.data.page * this.data.limit - this.data.limit, |
| | | size: this.data.limit, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate" |
| | | } |
| | | }) |
| | | .then(res => { |
| | | try { |
| | | if (res.datas.length > 0) { |
| | |
| | | isMoreData: dataList.length > 0 ? false : true, |
| | | skeletonLoding: false, |
| | | }) |
| | | console.log(this.data.list, 123) |
| | | } else { |
| | | this.setData({ |
| | | list: [], |
| | | pageTotalCount: 0, |
| | | skeletonLoding: false, |
| | | }) |
| | | } |