Showing
1 changed file
with
23 additions
and
15 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,17 +112,25 @@ export struct DetailVideoListPage { | @@ -112,17 +112,25 @@ export struct DetailVideoListPage { | ||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) { | 114 | async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) { |
| 115 | - this.openFullScreen(); | ||
| 116 | - const action: Action = router.getParams() as Action; | ||
| 117 | - if (action) { | ||
| 118 | - this.contentId = action.params?.contentID || ''; | ||
| 119 | - if (action.params && action.params.extra) { | ||
| 120 | - this.relId = action.params.extra.relId || ''; | ||
| 121 | - this.relType = action.params.extra.relType || ''; | 115 | + // 注册监听网络连接 |
| 116 | + this.netStatus = undefined | ||
| 117 | + let netStatus = NetworkUtil.isNetConnected() | ||
| 118 | + if (netStatus) { | ||
| 119 | + this.openFullScreen(); | ||
| 120 | + const action: Action = router.getParams() as Action; | ||
| 121 | + if (action) { | ||
| 122 | + this.contentId = action.params?.contentID || ''; | ||
| 123 | + if (action.params && action.params.extra) { | ||
| 124 | + this.relId = action.params.extra.relId || ''; | ||
| 125 | + this.relType = action.params.extra.relType || ''; | ||
| 126 | + } | ||
| 127 | + // console.info(TAG, `cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`) | ||
| 128 | + await this.getRmhContentDetail(this.contentId, this.relId, this.relType) | ||
| 129 | + this.getRmhPublishNexts(peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false)); | ||
| 122 | } | 130 | } |
| 123 | - console.info(`cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`) | ||
| 124 | - await this.getContentDetail(this.contentId, this.relId, this.relType) | ||
| 125 | - this.getRmhPublishNexts(peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false)); | 131 | + } else { |
| 132 | + // 无网络 | ||
| 133 | + this.netStatus = 1 | ||
| 126 | } | 134 | } |
| 127 | } | 135 | } |
| 128 | 136 | ||
| @@ -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