yangchenggong1_wd

fix |> 18815 互动消息-点击历史评论,鸿蒙版视频和图集详情页无法直接跳转到对应详情页的评论区

... ... @@ -23,13 +23,17 @@ struct MultiPictureDetailPage {
@Provide pageName: string = TrackConstants.PageName.Atlas_Detail
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
action: Action = {} as Action
build() {
Row() {
Column() {
MultiPictureDetailPageComponent({
relId: this.relId,
contentId: this.contentId,
relType: this.relType
relType: this.relType,
action: this.action
})
}
... ... @@ -53,13 +57,15 @@ struct MultiPictureDetailPage {
Logger.info(TAG, 'aboutToDisappear');
let par:Action = router.getParams() as Action;
let params = par?.params;
let action:Action = router.getParams() as Action;
let params = action?.params;
this.relId = params?.extra?.relId || '';
this.relType = params?.extra?.relType || '';
this.contentId = params?.contentID || '';
Logger.info(TAG, 'aboutToAppear');
Logger.info(TAG, 'params', JSON.stringify(params));
this.action = action
}
onBackPress() {
... ...
... ... @@ -7,7 +7,8 @@ import {
PhotoListBean,
postBatchAttentionStatusParams,
postInteractAccentionOperateParams,
postInteractBrowsOperateParams
postInteractBrowsOperateParams,
Action
} from 'wdBean';
import { DateTimeUtils } from 'wdKit/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
... ... @@ -65,6 +66,7 @@ export struct MultiPictureDetailPageComponent {
@State isScrollerTop: boolean = false;
@Provide duration: number = 0
@State executedStartTime: number = new Date().getTime()
action: Action = {} as Action
//watch监听页码回调
onCurrentPageNumUpdated(): void {
... ... @@ -97,6 +99,12 @@ export struct MultiPictureDetailPageComponent {
// })
this.getDetail()
this.contentTrackingDict()
if(this.action.params?.targetLayout == "comment"){
setTimeout(() => {
this.showCommentList = true
}, 1000)
}
}
contentTrackingDict() {
... ...