Showing
1 changed file
with
15 additions
and
7 deletions
| @@ -100,7 +100,7 @@ export struct DetailVideoListPage { | @@ -100,7 +100,7 @@ export struct DetailVideoListPage { | ||
| 100 | aboutToAppear() { | 100 | aboutToAppear() { |
| 101 | // 在视频详情页 | 101 | // 在视频详情页 |
| 102 | this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || ''; | 102 | this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || ''; |
| 103 | - console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`) | 103 | + // console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`) |
| 104 | if (this.peopleShipHomeCreatorId) { | 104 | if (this.peopleShipHomeCreatorId) { |
| 105 | // 从人民号号主传过来的 | 105 | // 从人民号号主传过来的 |
| 106 | this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId); | 106 | this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId); |
| @@ -112,6 +112,10 @@ export struct DetailVideoListPage { | @@ -112,6 +112,10 @@ export struct DetailVideoListPage { | ||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) { | 114 | async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) { |
| 115 | + // 注册监听网络连接 | ||
| 116 | + this.netStatus = undefined | ||
| 117 | + let netStatus = NetworkUtil.isNetConnected() | ||
| 118 | + if (netStatus) { | ||
| 115 | this.openFullScreen(); | 119 | this.openFullScreen(); |
| 116 | const action: Action = router.getParams() as Action; | 120 | const action: Action = router.getParams() as Action; |
| 117 | if (action) { | 121 | if (action) { |
| @@ -120,10 +124,14 @@ export struct DetailVideoListPage { | @@ -120,10 +124,14 @@ export struct DetailVideoListPage { | ||
| 120 | this.relId = action.params.extra.relId || ''; | 124 | this.relId = action.params.extra.relId || ''; |
| 121 | this.relType = action.params.extra.relType || ''; | 125 | this.relType = action.params.extra.relType || ''; |
| 122 | } | 126 | } |
| 123 | - console.info(`cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`) | ||
| 124 | - await this.getContentDetail(this.contentId, this.relId, this.relType) | 127 | + // console.info(TAG, `cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`) |
| 128 | + await this.getRmhContentDetail(this.contentId, this.relId, this.relType) | ||
| 125 | this.getRmhPublishNexts(peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false)); | 129 | this.getRmhPublishNexts(peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false)); |
| 126 | } | 130 | } |
| 131 | + } else { | ||
| 132 | + // 无网络 | ||
| 133 | + this.netStatus = 1 | ||
| 134 | + } | ||
| 127 | } | 135 | } |
| 128 | 136 | ||
| 129 | aboutToDisappear(): void { | 137 | aboutToDisappear(): void { |
| @@ -249,8 +257,8 @@ export struct DetailVideoListPage { | @@ -249,8 +257,8 @@ export struct DetailVideoListPage { | ||
| 249 | relId: relId, | 257 | relId: relId, |
| 250 | relType: relType | 258 | relType: relType |
| 251 | }).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => { | 259 | }).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => { |
| 252 | - console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data)) | ||
| 253 | - this.isOffLine = resDTO.data == null ? true : false | 260 | + // console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data)) |
| 261 | + // this.isOffLine = resDTO.data == null ? true : false | ||
| 254 | if (resDTO.data) { | 262 | if (resDTO.data) { |
| 255 | const params: contentListParams = { | 263 | const params: contentListParams = { |
| 256 | contentList: [{ | 264 | contentList: [{ |
| @@ -288,7 +296,7 @@ export struct DetailVideoListPage { | @@ -288,7 +296,7 @@ export struct DetailVideoListPage { | ||
| 288 | pageSize: pageSize, | 296 | pageSize: pageSize, |
| 289 | refreshTime: refreshTime | 297 | refreshTime: refreshTime |
| 290 | }).then(async (resDTO: ResponseDTO<PeopleShipNextListDTO>) => { | 298 | }).then(async (resDTO: ResponseDTO<PeopleShipNextListDTO>) => { |
| 291 | - console.log(TAG, 'cj2024 getRmhPublishNexts:', JSON.stringify(resDTO.data)) | 299 | + // console.log(TAG, 'cj2024 getRmhPublishNexts:', JSON.stringify(resDTO.data)) |
| 292 | this.isOffLine = resDTO.data == null ? true : false | 300 | this.isOffLine = resDTO.data == null ? true : false |
| 293 | if (resDTO.data && resDTO.data.list && resDTO.data.list.length > 0) { | 301 | if (resDTO.data && resDTO.data.list && resDTO.data.list.length > 0) { |
| 294 | const params: contentListParams = { | 302 | const params: contentListParams = { |
| @@ -321,7 +329,7 @@ export struct DetailVideoListPage { | @@ -321,7 +329,7 @@ export struct DetailVideoListPage { | ||
| 321 | refreshCnt: 1 | 329 | refreshCnt: 1 |
| 322 | }).then(async res => { | 330 | }).then(async res => { |
| 323 | if (res.data) { | 331 | if (res.data) { |
| 324 | - console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data)) | 332 | + // console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data)) |
| 325 | await this.getContentInteract(res.data) | 333 | await this.getContentInteract(res.data) |
| 326 | this.data = this.data.concat(res.data) | 334 | this.data = this.data.concat(res.data) |
| 327 | // console.log('视频列表===', JSON.stringify(res.data)) | 335 | // console.log('视频列表===', JSON.stringify(res.data)) |
-
Please register or login to post a comment