王士厅

fix: 个人评论列表,点击已评论视频,进入视频详情页,未弹出评论弹窗。

... ... @@ -189,12 +189,12 @@ export class ProcessUtils {
if (typeof type == "number") {
type = `${type}`
}
// Logger.debug(TAG, `objectType, ${JSON.stringify(content)}`);
// console.log(TAG, `DetailVideoListPage objectType, ${JSON.stringify(content)}`);
switch (type) {
case ContentConstants.TYPE_NONE:
// Logger.debug(TAG, "processPage, do nothing");
break;
case ContentConstants.TYPE_VOD:
case ContentConstants.TYPE_VOD: // 视频详情
// Logger.debug(TAG, "processPage, nonsupport!!!");
ProcessUtils.gotoVod(content)
break;
... ... @@ -282,7 +282,7 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoDynamicDetailPage, ${content.objectId}`);
// Logger.debug(TAG, `gotoDynamicDetailPage, ${content.objectId}`);
}
/**
... ... @@ -473,7 +473,8 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
commentId: content?.commentInfo?.commentId,
showComment: content.showComment
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
... ...
... ... @@ -20,4 +20,5 @@ export interface ExtraDTO extends ItemDTO {
commentId?: string;
extra?:string
title: string
showComment?:boolean
}
\ No newline at end of file
... ...
... ... @@ -146,6 +146,9 @@ export class ContentDTO implements BaseDTO {
author: string = ""; ///撰稿人
clickComment:boolean = false;
// 号主页评论列表点击跳转到视频详情判断评论弹框是否展开
showComment?:boolean = false;
static clone(old: ContentDTO): ContentDTO {
let content = new ContentDTO();
content.liveType = old.liveType;
... ...
... ... @@ -299,6 +299,7 @@ function getParams(item: CommentListItem) : ContentDTO{
contentDTO.relId = item.targetRelId;
contentDTO.objectType = item.targetType + "";
contentDTO.newsTitle = item.targetTitle
contentDTO.showComment = true
return contentDTO
}
... ...
... ... @@ -285,6 +285,7 @@ export struct DetailPlayShortVideoPage {
}
showCommentListChanged() {
// console.log('DetailVideoListPage showCommentListChanged this.showCommentList', this.showCommentList)
if (this.showCommentList) {
this.playerWidth = px2vp(this.windowWidth)
// this.playerHeight = px2vp(this.windowWidth) / (16 / 9.0)
... ...
... ... @@ -99,7 +99,7 @@ export struct DetailVideoListPage {
aboutToAppear() {
// 在视频详情页
this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || '';
console.info(TAG, `cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
// console.info(TAG, `cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
if (this.peopleShipHomeCreatorId) {
// 从人民号号主传过来的
this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId);
... ... @@ -110,6 +110,8 @@ export struct DetailVideoListPage {
}
async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) {
// 注册监听网络连接
this.netStatus = undefined
... ... @@ -165,6 +167,19 @@ export struct DetailVideoListPage {
this.AudioSuspension.minimize()
}
});
const action: Action = router.getParams() as Action;
if (action) {
if (action.params && action.params.extra) {
if(action.params.extra.showComment) {
// 目的子组件watch生效
setTimeout(() => {
this.showCommentList = true
}, 300)
}
}
}
// console.log(TAG, 'onPageShow', JSON.stringify(action.params))
}
onPageHide(): void {
... ...
... ... @@ -17,11 +17,14 @@ export struct CommentDialogView {
@State @Watch("innerShowCommentChange") innerShowComment: boolean = false
showCommentListChange(val: boolean) {
// console.log('DetailVideoListPage this.showCommentList', this.showCommentList)
if (this.showCommentList && this.index === this.currentIndex) {
this.innerShowComment = true
} else {
this.innerShowComment = false
}
// console.log('DetailVideoListPage this.index', this.index)
// console.log('DetailVideoListPage this.currentIndex', this.currentIndex)
}
innerShowCommentChange() {
... ...