Showing
1 changed file
with
16 additions
and
10 deletions
| @@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio | @@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio | ||
| 25 | import { CardParser } from '../CardParser' | 25 | import { CardParser } from '../CardParser' |
| 26 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; | 26 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; |
| 27 | import PageFollowHelper from '../../viewmodel/PageFollowHelper'; | 27 | import PageFollowHelper from '../../viewmodel/PageFollowHelper'; |
| 28 | +import { MineFollowListItem } from '../../viewmodel/MineFollowListItem'; | ||
| 28 | 29 | ||
| 29 | const TAG = 'PeopleShipMainComponent'; | 30 | const TAG = 'PeopleShipMainComponent'; |
| 30 | 31 | ||
| @@ -228,12 +229,10 @@ export struct PeopleShipMainComponent { | @@ -228,12 +229,10 @@ export struct PeopleShipMainComponent { | ||
| 228 | this.followList = [] | 229 | this.followList = [] |
| 229 | this.getRmhRecommendInfo(resolve) | 230 | this.getRmhRecommendInfo(resolve) |
| 230 | } else { | 231 | } else { |
| 231 | - this.followList = [] | ||
| 232 | - this.followList.push(...followInfo.list) | ||
| 233 | - this.attentionList = [] | 232 | + |
| 234 | this.currentPage = 1 | 233 | this.currentPage = 1 |
| 235 | this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | 234 | this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) |
| 236 | - this.getAttentionContentListData(resolve) | 235 | + this.getAttentionContentListData(resolve,followInfo) |
| 237 | } | 236 | } |
| 238 | } else { | 237 | } else { |
| 239 | this.followList = [] | 238 | this.followList = [] |
| @@ -273,7 +272,7 @@ export struct PeopleShipMainComponent { | @@ -273,7 +272,7 @@ export struct PeopleShipMainComponent { | ||
| 273 | } | 272 | } |
| 274 | 273 | ||
| 275 | // 获取关注 | 274 | // 获取关注 |
| 276 | - private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void) { | 275 | + private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) { |
| 277 | if (this.isLoading && this.currentPage != 1) { | 276 | if (this.isLoading && this.currentPage != 1) { |
| 278 | if (resolve) { | 277 | if (resolve) { |
| 279 | resolve('') | 278 | resolve('') |
| @@ -291,11 +290,9 @@ export struct PeopleShipMainComponent { | @@ -291,11 +290,9 @@ export struct PeopleShipMainComponent { | ||
| 291 | } else { | 290 | } else { |
| 292 | this.hasMore = false; | 291 | this.hasMore = false; |
| 293 | } | 292 | } |
| 294 | - if (this.currentPage == 1) { | ||
| 295 | - this.attentionList = [] | ||
| 296 | - } | 293 | + |
| 297 | //批量查询各类型内容动态数据接口 | 294 | //批量查询各类型内容动态数据接口 |
| 298 | - this.checkContentInteractData(listData.list, resolve) | 295 | + this.checkContentInteractData(listData.list, resolve,myFollowInfor) |
| 299 | } else { | 296 | } else { |
| 300 | this.hasMore = false; | 297 | this.hasMore = false; |
| 301 | this.resolveEnd(true, resolve) | 298 | this.resolveEnd(true, resolve) |
| @@ -307,7 +304,7 @@ export struct PeopleShipMainComponent { | @@ -307,7 +304,7 @@ export struct PeopleShipMainComponent { | ||
| 307 | } | 304 | } |
| 308 | 305 | ||
| 309 | // 批量查询各类型内容动态数据接口 | 306 | // 批量查询各类型内容动态数据接口 |
| 310 | - private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void) { | 307 | + private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) { |
| 311 | // 批量查询内容当前用户点赞、收藏状态 | 308 | // 批量查询内容当前用户点赞、收藏状态 |
| 312 | try { | 309 | try { |
| 313 | // 获取列表数据 | 310 | // 获取列表数据 |
| @@ -324,6 +321,15 @@ export struct PeopleShipMainComponent { | @@ -324,6 +321,15 @@ export struct PeopleShipMainComponent { | ||
| 324 | let listData = await PeopleShipMainViewModel.getContentInteractInfo(params) | 321 | let listData = await PeopleShipMainViewModel.getContentInteractInfo(params) |
| 325 | Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`) | 322 | Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`) |
| 326 | this.resolveEnd(true, resolve) | 323 | this.resolveEnd(true, resolve) |
| 324 | + | ||
| 325 | + if (this.currentPage == 1) { | ||
| 326 | + this.attentionList = [] | ||
| 327 | + this.followList = [] | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + if(myFollowInfor){ | ||
| 331 | + this.followList.push(...myFollowInfor.list) | ||
| 332 | + } | ||
| 327 | list.forEach((element: ContentDTO) => { | 333 | list.forEach((element: ContentDTO) => { |
| 328 | // 获取 interactData 数据 | 334 | // 获取 interactData 数据 |
| 329 | if (listData && listData.length > 0) { | 335 | if (listData && listData.length > 0) { |
-
Please register or login to post a comment