王士厅

fix: 号主:甘肃发布,动态视频详情页点击视频,先闪一下获取内容失败,再继续播放视频

... ... @@ -100,7 +100,7 @@ export struct DetailVideoListPage {
aboutToAppear() {
// 在视频详情页
this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || '';
console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
// console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
if (this.peopleShipHomeCreatorId) {
// 从人民号号主传过来的
this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId);
... ... @@ -112,6 +112,10 @@ export struct DetailVideoListPage {
}
async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) {
// 注册监听网络连接
this.netStatus = undefined
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
this.openFullScreen();
const action: Action = router.getParams() as Action;
if (action) {
... ... @@ -120,10 +124,14 @@ export struct DetailVideoListPage {
this.relId = action.params.extra.relId || '';
this.relType = action.params.extra.relType || '';
}
console.info(`cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`)
await this.getContentDetail(this.contentId, this.relId, this.relType)
// console.info(TAG, `cj2024 getPeopleShipHomeDetail contentId = ${this.contentId}`)
await this.getRmhContentDetail(this.contentId, this.relId, this.relType)
this.getRmhPublishNexts(peopleShipHomeCreatorId, this.contentId, 1, 1, 10, systemDateTime.getTime(false));
}
} else {
// 无网络
this.netStatus = 1
}
}
aboutToDisappear(): void {
... ... @@ -249,8 +257,8 @@ export struct DetailVideoListPage {
relId: relId,
relType: relType
}).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
this.isOffLine = resDTO.data == null ? true : false
// console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
// this.isOffLine = resDTO.data == null ? true : false
if (resDTO.data) {
const params: contentListParams = {
contentList: [{
... ... @@ -288,7 +296,7 @@ export struct DetailVideoListPage {
pageSize: pageSize,
refreshTime: refreshTime
}).then(async (resDTO: ResponseDTO<PeopleShipNextListDTO>) => {
console.log(TAG, 'cj2024 getRmhPublishNexts:', JSON.stringify(resDTO.data))
// console.log(TAG, 'cj2024 getRmhPublishNexts:', JSON.stringify(resDTO.data))
this.isOffLine = resDTO.data == null ? true : false
if (resDTO.data && resDTO.data.list && resDTO.data.list.length > 0) {
const params: contentListParams = {
... ... @@ -321,7 +329,7 @@ export struct DetailVideoListPage {
refreshCnt: 1
}).then(async res => {
if (res.data) {
console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data))
// console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data))
await this.getContentInteract(res.data)
this.data = this.data.concat(res.data)
// console.log('视频列表===', JSON.stringify(res.data))
... ...