王士厅

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

@@ -189,12 +189,12 @@ export class ProcessUtils { @@ -189,12 +189,12 @@ export class ProcessUtils {
189 if (typeof type == "number") { 189 if (typeof type == "number") {
190 type = `${type}` 190 type = `${type}`
191 } 191 }
192 - // Logger.debug(TAG, `objectType, ${JSON.stringify(content)}`); 192 + // console.log(TAG, `DetailVideoListPage objectType, ${JSON.stringify(content)}`);
193 switch (type) { 193 switch (type) {
194 case ContentConstants.TYPE_NONE: 194 case ContentConstants.TYPE_NONE:
195 // Logger.debug(TAG, "processPage, do nothing"); 195 // Logger.debug(TAG, "processPage, do nothing");
196 break; 196 break;
197 - case ContentConstants.TYPE_VOD: 197 + case ContentConstants.TYPE_VOD: // 视频详情
198 // Logger.debug(TAG, "processPage, nonsupport!!!"); 198 // Logger.debug(TAG, "processPage, nonsupport!!!");
199 ProcessUtils.gotoVod(content) 199 ProcessUtils.gotoVod(content)
200 break; 200 break;
@@ -282,7 +282,7 @@ export class ProcessUtils { @@ -282,7 +282,7 @@ export class ProcessUtils {
282 } as Params, 282 } as Params,
283 }; 283 };
284 WDRouterRule.jumpWithAction(taskAction) 284 WDRouterRule.jumpWithAction(taskAction)
285 - Logger.debug(TAG, `gotoDynamicDetailPage, ${content.objectId}`); 285 + // Logger.debug(TAG, `gotoDynamicDetailPage, ${content.objectId}`);
286 } 286 }
287 287
288 /** 288 /**
@@ -473,7 +473,8 @@ export class ProcessUtils { @@ -473,7 +473,8 @@ export class ProcessUtils {
473 relType: content?.relType, 473 relType: content?.relType,
474 relId: content?.relId, 474 relId: content?.relId,
475 sourcePage: '5', 475 sourcePage: '5',
476 - commentId: content?.commentInfo?.commentId 476 + commentId: content?.commentInfo?.commentId,
  477 + showComment: content.showComment
477 } as ExtraDTO, 478 } as ExtraDTO,
478 targetLayout: content.customParamTargetLayout 479 targetLayout: content.customParamTargetLayout
479 } as Params, 480 } as Params,
@@ -20,4 +20,5 @@ export interface ExtraDTO extends ItemDTO { @@ -20,4 +20,5 @@ export interface ExtraDTO extends ItemDTO {
20 commentId?: string; 20 commentId?: string;
21 extra?:string 21 extra?:string
22 title: string 22 title: string
  23 + showComment?:boolean
23 } 24 }
@@ -146,6 +146,9 @@ export class ContentDTO implements BaseDTO { @@ -146,6 +146,9 @@ export class ContentDTO implements BaseDTO {
146 author: string = ""; ///撰稿人 146 author: string = ""; ///撰稿人
147 clickComment:boolean = false; 147 clickComment:boolean = false;
148 148
  149 + // 号主页评论列表点击跳转到视频详情判断评论弹框是否展开
  150 + showComment?:boolean = false;
  151 +
149 static clone(old: ContentDTO): ContentDTO { 152 static clone(old: ContentDTO): ContentDTO {
150 let content = new ContentDTO(); 153 let content = new ContentDTO();
151 content.liveType = old.liveType; 154 content.liveType = old.liveType;
@@ -299,6 +299,7 @@ function getParams(item: CommentListItem) : ContentDTO{ @@ -299,6 +299,7 @@ function getParams(item: CommentListItem) : ContentDTO{
299 contentDTO.relId = item.targetRelId; 299 contentDTO.relId = item.targetRelId;
300 contentDTO.objectType = item.targetType + ""; 300 contentDTO.objectType = item.targetType + "";
301 contentDTO.newsTitle = item.targetTitle 301 contentDTO.newsTitle = item.targetTitle
  302 + contentDTO.showComment = true
302 303
303 return contentDTO 304 return contentDTO
304 } 305 }
@@ -285,6 +285,7 @@ export struct DetailPlayShortVideoPage { @@ -285,6 +285,7 @@ export struct DetailPlayShortVideoPage {
285 } 285 }
286 286
287 showCommentListChanged() { 287 showCommentListChanged() {
  288 + // console.log('DetailVideoListPage showCommentListChanged this.showCommentList', this.showCommentList)
288 if (this.showCommentList) { 289 if (this.showCommentList) {
289 this.playerWidth = px2vp(this.windowWidth) 290 this.playerWidth = px2vp(this.windowWidth)
290 // this.playerHeight = px2vp(this.windowWidth) / (16 / 9.0) 291 // this.playerHeight = px2vp(this.windowWidth) / (16 / 9.0)
@@ -99,7 +99,7 @@ export struct DetailVideoListPage { @@ -99,7 +99,7 @@ export struct DetailVideoListPage {
99 aboutToAppear() { 99 aboutToAppear() {
100 // 在视频详情页 100 // 在视频详情页
101 this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || ''; 101 this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || '';
102 - console.info(TAG, `cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`) 102 + // console.info(TAG, `cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`)
103 if (this.peopleShipHomeCreatorId) { 103 if (this.peopleShipHomeCreatorId) {
104 // 从人民号号主传过来的 104 // 从人民号号主传过来的
105 this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId); 105 this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId);
@@ -110,6 +110,8 @@ export struct DetailVideoListPage { @@ -110,6 +110,8 @@ export struct DetailVideoListPage {
110 110
111 } 111 }
112 112
  113 +
  114 +
113 async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) { 115 async getPeopleShipHomeDetail(peopleShipHomeCreatorId: string) {
114 // 注册监听网络连接 116 // 注册监听网络连接
115 this.netStatus = undefined 117 this.netStatus = undefined
@@ -165,6 +167,19 @@ export struct DetailVideoListPage { @@ -165,6 +167,19 @@ export struct DetailVideoListPage {
165 this.AudioSuspension.minimize() 167 this.AudioSuspension.minimize()
166 } 168 }
167 }); 169 });
  170 +
  171 + const action: Action = router.getParams() as Action;
  172 + if (action) {
  173 + if (action.params && action.params.extra) {
  174 + if(action.params.extra.showComment) {
  175 + // 目的子组件watch生效
  176 + setTimeout(() => {
  177 + this.showCommentList = true
  178 + }, 300)
  179 + }
  180 + }
  181 + }
  182 + // console.log(TAG, 'onPageShow', JSON.stringify(action.params))
168 } 183 }
169 184
170 onPageHide(): void { 185 onPageHide(): void {
@@ -17,11 +17,14 @@ export struct CommentDialogView { @@ -17,11 +17,14 @@ export struct CommentDialogView {
17 @State @Watch("innerShowCommentChange") innerShowComment: boolean = false 17 @State @Watch("innerShowCommentChange") innerShowComment: boolean = false
18 18
19 showCommentListChange(val: boolean) { 19 showCommentListChange(val: boolean) {
  20 + // console.log('DetailVideoListPage this.showCommentList', this.showCommentList)
20 if (this.showCommentList && this.index === this.currentIndex) { 21 if (this.showCommentList && this.index === this.currentIndex) {
21 this.innerShowComment = true 22 this.innerShowComment = true
22 } else { 23 } else {
23 this.innerShowComment = false 24 this.innerShowComment = false
24 } 25 }
  26 + // console.log('DetailVideoListPage this.index', this.index)
  27 + // console.log('DetailVideoListPage this.currentIndex', this.currentIndex)
25 } 28 }
26 29
27 innerShowCommentChange() { 30 innerShowCommentChange() {