From 7f00c1e046ff3404c5b47c44df9511cc2c392b92 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Thu, 11 Jun 2020 17:20:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=91=E7=9A=84=E8=AF=9D?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/components/topicItem/topicItem.wxml | 2 +- pages/mine/mine.js | 18 ++++++++++-------- pages/mine/mine.wxml | 2 +- utils/api.js | 16 +++++++++++++++- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/pages/mine/components/topicItem/topicItem.wxml b/pages/mine/components/topicItem/topicItem.wxml index 6bdbc63..c406d9b 100644 --- a/pages/mine/components/topicItem/topicItem.wxml +++ b/pages/mine/components/topicItem/topicItem.wxml @@ -13,7 +13,7 @@ - + {{topicObj.nickname}} diff --git a/pages/mine/mine.js b/pages/mine/mine.js index d051476..482efaa 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -112,13 +112,14 @@ Page({ }) const para = { pageIndex: this.data.pageNo, - pageSize: this.data.pageSize + pageSize: this.data.pageSize, + timestamp: getTimestamp() } - api.getMyTopicList(para).then(res => { + api.getMyTopicListV2(para).then(res => { console.log('我的话题列表', res) this.setData({ - topicList: [...res.data], - nomoreStatus: res.data.length === 10 ? 'loading' : 'none', + topicList: [...res.data.topicList], + nomoreStatus: res.data.topicList.length === 10 ? 'loading' : 'none', preloadVisible: false }) }).catch(err => { @@ -134,13 +135,14 @@ Page({ loadMoreTopicList() { const para = { pageIndex: this.data.pageNo, - pageSize: this.data.pageSize + pageSize: this.data.pageSize, + timestamp: getTimestamp() } - api.getMyTopicList(para).then(res => { + api.getMyTopicListV2(para).then(res => { console.log('我的话题列表', res) - const topicList = [...this.data.topicList, ...res.data] + const topicList = [...this.data.topicList, ...res.data.topicList] this.setData({ - nomoreStatus: res.data.length === 10 ? 'loading' : 'none', + nomoreStatus: res.data.topicList.length === 10 ? 'loading' : 'none', preloadVisible: false, topicList, }) diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index 5cc42b7..47abd3d 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -108,7 +108,7 @@ 您还未发布话题 - 快到“党群互动”,到您的群里发布吧 + 快到“党群1+1”里发布吧 diff --git a/utils/api.js b/utils/api.js index 1629b90..4018626 100644 --- a/utils/api.js +++ b/utils/api.js @@ -18,6 +18,7 @@ module.exports = { getMyAssociation: getMyAssociation, getCommandAssociation: getCommandAssociation, getMyTopicList: getMyTopicList, + getMyTopicListV2:getMyTopicListV2, getMyIssueList: getMyIssueList, getMyProjectList: getMyProjectList, checkWxUnionId: checkWxUnionId, @@ -219,7 +220,20 @@ function getMyTopicList({ pageSize }) } - +/** + * 我的话题列表V2 + */ +function getMyTopicListV2({ + pageIndex, + pageSize, + timestamp +}) { + return fly.get('partyGroup/myTopicList/list', { + pageIndex, + pageSize, + timestamp + }) +} /** * 我的议题列表 */