Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
liyubing
2024-06-12 20:24:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3d3c30d48bd0cd054bb14b61450ff3043f00f427
3d3c30d4
1 parent
86d16739
fix:
1) 人民号-关注页进行刷新会出现空白页
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipMainComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipMainComponent.ets
View file @
3d3c30d
...
...
@@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio
import { CardParser } from '../CardParser'
import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
import PageFollowHelper from '../../viewmodel/PageFollowHelper';
import { MineFollowListItem } from '../../viewmodel/MineFollowListItem';
const TAG = 'PeopleShipMainComponent';
...
...
@@ -228,12 +229,10 @@ export struct PeopleShipMainComponent {
this.followList = []
this.getRmhRecommendInfo(resolve)
} else {
this.followList = []
this.followList.push(...followInfo.list)
this.attentionList = []
this.currentPage = 1
this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
this.getAttentionContentListData(resolve)
this.getAttentionContentListData(resolve
,followInfo
)
}
} else {
this.followList = []
...
...
@@ -273,7 +272,7 @@ export struct PeopleShipMainComponent {
}
// 获取关注
private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void) {
private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void
,myFollowInfor?:MineFollowListItem
) {
if (this.isLoading && this.currentPage != 1) {
if (resolve) {
resolve('')
...
...
@@ -291,11 +290,9 @@ export struct PeopleShipMainComponent {
} else {
this.hasMore = false;
}
if (this.currentPage == 1) {
this.attentionList = []
}
//批量查询各类型内容动态数据接口
this.checkContentInteractData(listData.list, resolve)
this.checkContentInteractData(listData.list, resolve
,myFollowInfor
)
} else {
this.hasMore = false;
this.resolveEnd(true, resolve)
...
...
@@ -307,7 +304,7 @@ export struct PeopleShipMainComponent {
}
// 批量查询各类型内容动态数据接口
private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void) {
private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void
,myFollowInfor?:MineFollowListItem
) {
// 批量查询内容当前用户点赞、收藏状态
try {
// 获取列表数据
...
...
@@ -324,6 +321,15 @@ export struct PeopleShipMainComponent {
let listData = await PeopleShipMainViewModel.getContentInteractInfo(params)
Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`)
this.resolveEnd(true, resolve)
if (this.currentPage == 1) {
this.attentionList = []
this.followList = []
}
if(myFollowInfor){
this.followList.push(...myFollowInfor.list)
}
list.forEach((element: ContentDTO) => {
// 获取 interactData 数据
if (listData && listData.length > 0) {
...
...
Please
register
or
login
to post a comment