王士厅
@@ -24,6 +24,7 @@ import { SpConstants } from 'wdConstant/Index'; @@ -24,6 +24,7 @@ import { SpConstants } from 'wdConstant/Index';
24 import { router } from '@kit.ArkUI'; 24 import { router } from '@kit.ArkUI';
25 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' 25 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
26 import { common } from '@kit.AbilityKit'; 26 import { common } from '@kit.AbilityKit';
  27 +import { CommentDialogView } from 'wdDetailPlayShortVideo/Index';
27 28
28 const TAG = 'MultiPictureDetailPageComponent'; 29 const TAG = 'MultiPictureDetailPageComponent';
29 30
@@ -37,20 +38,24 @@ export struct MultiPictureDetailPageComponent { @@ -37,20 +38,24 @@ export struct MultiPictureDetailPageComponent {
37 private picWidth: number = 0 38 private picWidth: number = 0
38 @State picHeight: number = 0 39 @State picHeight: number = 0
39 @State titleHeight: number = 0 40 @State titleHeight: number = 0
  41 + @State index: number = 0
  42 + @State currentIndex: number = 0
40 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 43 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
  44 + @Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0
  45 + @Provide windowHeight: number = AppStorage.get<number>('windowHeight') || 0
  46 + @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  47 + @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
41 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' 48 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01'
42 private swiperController: SwiperController = new SwiperController() 49 private swiperController: SwiperController = new SwiperController()
43 private swiperControllerItem: SwiperController = new SwiperController() 50 private swiperControllerItem: SwiperController = new SwiperController()
44 @State swiperIndex: number = 0; 51 @State swiperIndex: number = 0;
45 @Provide followStatus: string | undefined = undefined // 关注状态 52 @Provide followStatus: string | undefined = undefined // 关注状态
  53 + @Provide showCommentList: boolean = false
46 private scroller: Scroller = new Scroller() 54 private scroller: Scroller = new Scroller()
47 @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 55 @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
48 @State showDownload: Boolean = false // 控制是否显示下载默认隐藏 56 @State showDownload: Boolean = false // 控制是否显示下载默认隐藏
49 @State publishCommentModel: publishCommentModel = new publishCommentModel() 57 @State publishCommentModel: publishCommentModel = new publishCommentModel()
50 @State operationButtonList: string[] = ['comment', 'like', 'collect', 'share'] 58 @State operationButtonList: string[] = ['comment', 'like', 'collect', 'share']
51 - @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;  
52 - @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') as number;  
53 - @State windowHeight: number = AppStorage.get<number>('windowHeight') as number;  
54 @State currentOffset: number = 0 59 @State currentOffset: number = 0
55 @State duration: number = 0 60 @State duration: number = 0
56 61
@@ -92,6 +97,13 @@ export struct MultiPictureDetailPageComponent { @@ -92,6 +97,13 @@ export struct MultiPictureDetailPageComponent {
92 build() { 97 build() {
93 RelativeContainer() { 98 RelativeContainer() {
94 this.init() 99 this.init()
  100 + CommentDialogView({
  101 + index: $index,
  102 + currentIndex: $currentIndex,
  103 + showCommentList: $showCommentList,
  104 + publishCommentModel: $publishCommentModel
  105 + })
  106 +
95 } 107 }
96 .width('100%') 108 .width('100%')
97 .height('100%') 109 .height('100%')
@@ -369,8 +381,12 @@ export struct MultiPictureDetailPageComponent { @@ -369,8 +381,12 @@ export struct MultiPictureDetailPageComponent {
369 operationButtonList: this.operationButtonList, 381 operationButtonList: this.operationButtonList,
370 styleType: 2, 382 styleType: 2,
371 componentType: 5, 383 componentType: 5,
372 - pageComponentType: 3 384 + pageComponentType: 3,
  385 + onCommentIconClick: () => {
  386 + this.showCommentList = true
  387 + }
373 }) 388 })
  389 +
374 } 390 }
375 .transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine( 391 .transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine(
376 TransitionEffect.translate({ x: 0, y: `-${this.bottomSafeHeight}px` }) 392 TransitionEffect.translate({ x: 0, y: `-${this.bottomSafeHeight}px` })
@@ -551,8 +567,8 @@ export struct MultiPictureDetailPageComponent { @@ -551,8 +567,8 @@ export struct MultiPictureDetailPageComponent {
551 /** 567 /**
552 * 意图上报 568 * 意图上报
553 */ 569 */
554 - private viewBlogInsightIntentShare(){ 570 + private viewBlogInsightIntentShare() {
555 let context = getContext(this) as common.UIAbilityContext; 571 let context = getContext(this) as common.UIAbilityContext;
556 - viewBlogItemInsightIntentShare(context,this.contentDetailData) 572 + viewBlogItemInsightIntentShare(context, this.contentDetailData)
557 } 573 }
558 } 574 }
@@ -82,7 +82,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent @@ -82,7 +82,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
82 } 82 }
83 } 83 }
84 84
85 -//ViewBlog意图共享-节目详情 目前单独在详情页上报 85 +//ViewBlog意图共享-节目详情 详情页上报
86 export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, item: ContentDetailDTO, 86 export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, item: ContentDetailDTO,
87 interactData?: InteractDataDTO) { 87 interactData?: InteractDataDTO) {
88 let identifier = generateUUID() 88 let identifier = generateUUID()
@@ -5,3 +5,5 @@ export { DetailVideoListPage } from './src/main/ets/pages/DetailVideoListPage' @@ -5,3 +5,5 @@ export { DetailVideoListPage } from './src/main/ets/pages/DetailVideoListPage'
5 export { VideoChannelDetail } from './src/main/ets/pages/VideoChannelDetail' 5 export { VideoChannelDetail } from './src/main/ets/pages/VideoChannelDetail'
6 6
7 export { LottieViewDemo } from './src/main/ets/pages/LottieViewDemo' 7 export { LottieViewDemo } from './src/main/ets/pages/LottieViewDemo'
  8 +
  9 +export { CommentDialogView } from './src/main/ets/view/CommentDialogView'
@@ -15,8 +15,8 @@ import { HttpUtils } from 'wdNetwork/Index'; @@ -15,8 +15,8 @@ import { HttpUtils } from 'wdNetwork/Index';
15 import { DateTimeUtils, WindowModel } from 'wdKit/Index'; 15 import { DateTimeUtils, WindowModel } from 'wdKit/Index';
16 import { PlayerBottomView } from '../view/PlayerBottomView'; 16 import { PlayerBottomView } from '../view/PlayerBottomView';
17 import { PlayerRightView } from '../view/PlayerRightView'; 17 import { PlayerRightView } from '../view/PlayerRightView';
18 -import { CommentDialogView } from '../view/CommentDialogView';  
19 import { DisplayDirection } from 'wdConstant/Index'; 18 import { DisplayDirection } from 'wdConstant/Index';
  19 +import { CommentDialogView } from '../view/CommentDialogView';
20 20
21 const TAG = 'DetailPlayShortVideoPage'; 21 const TAG = 'DetailPlayShortVideoPage';
22 22
@@ -28,6 +28,7 @@ const TAG = 'DetailPlayShortVideoPage'; @@ -28,6 +28,7 @@ const TAG = 'DetailPlayShortVideoPage';
28 export struct DetailPlayShortVideoPage { 28 export struct DetailPlayShortVideoPage {
29 @Prop index: number = 0 29 @Prop index: number = 0
30 @Prop @Watch('currentIndexChange') currentIndex: number = 0 30 @Prop @Watch('currentIndexChange') currentIndex: number = 0
  31 + @Provide publishCommentModel: publishCommentModel = new publishCommentModel()
31 @State playerController: WDPlayerController = new WDPlayerController(); 32 @State playerController: WDPlayerController = new WDPlayerController();
32 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 33 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
33 @Provide interactData: InteractDataDTO = {} as InteractDataDTO 34 @Provide interactData: InteractDataDTO = {} as InteractDataDTO
@@ -47,7 +48,6 @@ export struct DetailPlayShortVideoPage { @@ -47,7 +48,6 @@ export struct DetailPlayShortVideoPage {
47 @Consume topSafeHeight: number 48 @Consume topSafeHeight: number
48 @Consume showComment: boolean // 是否显示底部评论,首页视频频道传false 49 @Consume showComment: boolean // 是否显示底部评论,首页视频频道传false
49 @State imageVisible: boolean = true 50 @State imageVisible: boolean = true
50 - @State publishCommentModel: publishCommentModel = new publishCommentModel()  
51 @State ratio: number = 16 / 9 51 @State ratio: number = 16 / 9
52 52
53 /** 53 /**
@@ -164,15 +164,6 @@ export struct DetailPlayShortVideoPage { @@ -164,15 +164,6 @@ export struct DetailPlayShortVideoPage {
164 } 164 }
165 this.queryNewsInfoOfUser() 165 this.queryNewsInfoOfUser()
166 166
167 - this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')  
168 - this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')  
169 - this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle  
170 - this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')  
171 - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')  
172 - this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')  
173 - this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')  
174 - this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')  
175 - this.publishCommentModel.commentContent = ''  
176 167
177 } 168 }
178 169
@@ -186,7 +177,12 @@ export struct DetailPlayShortVideoPage { @@ -186,7 +177,12 @@ export struct DetailPlayShortVideoPage {
186 Stack({ alignContent: Alignment.Top }) { 177 Stack({ alignContent: Alignment.Top }) {
187 Column() { 178 Column() {
188 Stack() { 179 Stack() {
189 - 180 + CommentDialogView({
  181 + index: $index,
  182 + currentIndex: $currentIndex,
  183 + showCommentList: $showCommentList,
  184 + publishCommentModel: $publishCommentModel
  185 + })
190 this.playerViewBuilder() 186 this.playerViewBuilder()
191 187
192 PlayerBottomView({ 188 PlayerBottomView({
@@ -224,7 +220,6 @@ export struct DetailPlayShortVideoPage { @@ -224,7 +220,6 @@ export struct DetailPlayShortVideoPage {
224 .height('100%') 220 .height('100%')
225 .width('100%') 221 .width('100%')
226 222
227 - CommentDialogView({ publishCommentModel: this.publishCommentModel })  
228 } 223 }
229 .height('100%') 224 .height('100%')
230 .width('100%') 225 .width('100%')
@@ -9,19 +9,25 @@ import { OperRowListView } from '../../../../../wdComponent/src/main/ets/compone @@ -9,19 +9,25 @@ import { OperRowListView } from '../../../../../wdComponent/src/main/ets/compone
9 9
10 @Component 10 @Component
11 export struct CommentDialogView { 11 export struct CommentDialogView {
12 - @Prop publishCommentModel: publishCommentModel 12 + @Link publishCommentModel: publishCommentModel
  13 + @Link @Watch('showCommentListChange') showCommentList: boolean
  14 + @Link index: number
  15 + @Link currentIndex: number
13 @Consume windowWidth: number 16 @Consume windowWidth: number
14 @Consume windowHeight: number 17 @Consume windowHeight: number
15 @Consume bottomSafeHeight: number 18 @Consume bottomSafeHeight: number
16 @Consume topSafeHeight: number 19 @Consume topSafeHeight: number
17 @Consume contentDetailData: ContentDetailDTO 20 @Consume contentDetailData: ContentDetailDTO
18 - @Consume @Watch('showCommentListChange') showCommentList: boolean  
19 @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16) 21 @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
20 - @State modifier: DrawModifier = new DrawModifier();  
21 - private dialogController: CustomDialogController = new CustomDialogController({ 22 + // @State modifier: DrawModifier = new DrawModifier();
  23 + dialogController: CustomDialogController = new CustomDialogController({
22 builder: DetailDialog({ 24 builder: DetailDialog({
23 - publishCommentModel: this.publishCommentModel,  
24 - dialogOffsetY: $dialogOffsetY 25 + publishCommentModel: $publishCommentModel,
  26 + contentDetailData: $contentDetailData,
  27 + dialogOffsetY: $dialogOffsetY,
  28 + showCommentList: $showCommentList,
  29 + windowWidth: this.windowWidth,
  30 + windowHeight: this.windowHeight
25 }), 31 }),
26 autoCancel: false, 32 autoCancel: false,
27 customStyle: true, 33 customStyle: true,
@@ -30,8 +36,8 @@ export struct CommentDialogView { @@ -30,8 +36,8 @@ export struct CommentDialogView {
30 // this.showCommentList = false 36 // this.showCommentList = false
31 // dismissDialogAction.dismiss() 37 // dismissDialogAction.dismiss()
32 // }, 38 // },
33 - openAnimation: { duration: 0 },  
34 - closeAnimation: { duration: 0 }, 39 + // openAnimation: { duration: 0 },
  40 + // closeAnimation: { duration: 0 },
35 }) 41 })
36 42
37 /** 43 /**
@@ -39,7 +45,7 @@ export struct CommentDialogView { @@ -39,7 +45,7 @@ export struct CommentDialogView {
39 */ 45 */
40 46
41 showCommentListChange(val: boolean) { 47 showCommentListChange(val: boolean) {
42 - if (this.showCommentList) { 48 + if (this.showCommentList && this.index === this.currentIndex) {
43 this.dialogController.open() 49 this.dialogController.open()
44 console.log('open') 50 console.log('open')
45 // animateTo({ duration: 10000, expectedFrameRateRange: { min: 60, max: 60, expected: 60 } }, () => { 51 // animateTo({ duration: 10000, expectedFrameRateRange: { min: 60, max: 60, expected: 60 } }, () => {
@@ -59,15 +65,16 @@ export struct CommentDialogView { @@ -59,15 +65,16 @@ export struct CommentDialogView {
59 @CustomDialog 65 @CustomDialog
60 export struct DetailDialog { 66 export struct DetailDialog {
61 controller: CustomDialogController 67 controller: CustomDialogController
62 - @Prop publishCommentModel: publishCommentModel 68 + @Link publishCommentModel: publishCommentModel
63 @Link dialogOffsetY: number 69 @Link dialogOffsetY: number
64 - @Consume contentDetailData: ContentDetailDTO  
65 - @Consume showCommentList: boolean  
66 - @Consume windowWidth: number  
67 - @Consume windowHeight: number 70 + @Link contentDetailData: ContentDetailDTO
  71 + @Link showCommentList: boolean
  72 + @Prop windowWidth: number
  73 + @Prop windowHeight: number
68 74
69 build() { 75 build() {
70 Column() { 76 Column() {
  77 + Scroll() {
71 CommentComponent({ 78 CommentComponent({
72 publishCommentModel: this.publishCommentModel, 79 publishCommentModel: this.publishCommentModel,
73 showCloseIcon: true, 80 showCloseIcon: true,
@@ -75,9 +82,15 @@ export struct DetailDialog { @@ -75,9 +82,15 @@ export struct DetailDialog {
75 console.log('onCloseClick') 82 console.log('onCloseClick')
76 this.showCommentList = false 83 this.showCommentList = false
77 this.controller.close() 84 this.controller.close()
  85 + // setTimeout(() => {
  86 + //
  87 + // }, 1000)
  88 +
  89 + }
  90 + }).height('100%')
78 } 91 }
79 - })  
80 .layoutWeight(1) 92 .layoutWeight(1)
  93 +
81 OperRowListView({ 94 OperRowListView({
82 componentType: 1, 95 componentType: 1,
83 showBackIcon: false, 96 showBackIcon: false,
@@ -69,7 +69,6 @@ export struct PlayerProgressView { @@ -69,7 +69,6 @@ export struct PlayerProgressView {
69 69
70 }) 70 })
71 } 71 }
72 - .margin({ top: 40 })  
73 .visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible) 72 .visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible)
74 } 73 }
75 } 74 }
@@ -7,6 +7,9 @@ import { @@ -7,6 +7,9 @@ import {
7 postExecuteLikeParams, 7 postExecuteLikeParams,
8 postInteractAccentionOperateParams 8 postInteractAccentionOperateParams
9 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; 9 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
  10 +import {
  11 + publishCommentModel
  12 +} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
10 import { SPHelper, ToastUtils, NumberFormatterUtils } from 'wdKit'; 13 import { SPHelper, ToastUtils, NumberFormatterUtils } from 'wdKit';
11 import { WDPlayerController } from 'wdPlayer/Index'; 14 import { WDPlayerController } from 'wdPlayer/Index';
12 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 15 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
@@ -34,6 +37,7 @@ export struct PlayerRightView { @@ -34,6 +37,7 @@ export struct PlayerRightView {
34 @Consume showComment?: boolean 37 @Consume showComment?: boolean
35 @Consume showCommentList: boolean 38 @Consume showCommentList: boolean
36 @Consume displayDirection: DisplayDirection 39 @Consume displayDirection: DisplayDirection
  40 + @Consume publishCommentModel: publishCommentModel
37 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 41 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
38 42
39 aboutToAppear() { 43 aboutToAppear() {
@@ -346,6 +350,16 @@ export struct PlayerRightView { @@ -346,6 +350,16 @@ export struct PlayerRightView {
346 } 350 }
347 .margin({ bottom: 20 }) 351 .margin({ bottom: 20 })
348 .onClick((event: ClickEvent) => { 352 .onClick((event: ClickEvent) => {
  353 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  354 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
  355 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  356 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
  357 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
  358 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
  359 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
  360 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
  361 + this.publishCommentModel.commentContent = ''
  362 +
349 // ToastUtils.showToast('评论为公共方法,待开发', 1000); 363 // ToastUtils.showToast('评论为公共方法,待开发', 1000);
350 this.showCommentList = true 364 this.showCommentList = true
351 }) 365 })
@@ -45,10 +45,10 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { @@ -45,10 +45,10 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
45 console.log('yzl jumpToView',JSON.stringify(param)) 45 console.log('yzl jumpToView',JSON.stringify(param))
46 return new Promise((resolve, reject) => { 46 return new Promise((resolve, reject) => {
47 // TODO 实现意图调用,loadContent的入参为歌曲落地页路径,例如:pages/SongPage 47 // TODO 实现意图调用,loadContent的入参为歌曲落地页路径,例如:pages/SongPage
  48 + // TODO 热启动是否切到主页
48 pageLoader.loadContent('pages/MainPage') 49 pageLoader.loadContent('pages/MainPage')
49 .then(() => { 50 .then(() => {
50 - let entityGroupId: string = (param.items as Array<object>)?.[0]?.['entityGroupId'];  
51 - ProcessUtils.jumpChannelTab(entityGroupId,'') 51 +
52 resolve({ 52 resolve({
53 code: 0, 53 code: 0,
54 result: { 54 result: {
@@ -68,7 +68,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { @@ -68,7 +68,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
68 } 68 }
69 69
70 /** 70 /**
71 - * 实现事件推荐功能 71 + * 实现事件推荐功能-打开早晚报
72 * @param param 意图参数 72 * @param param 意图参数
73 * @param pageLoader 窗口 73 * @param pageLoader 窗口
74 */ 74 */
@@ -77,7 +77,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { @@ -77,7 +77,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
77 return new Promise((resolve, reject) => { 77 return new Promise((resolve, reject) => {
78 pageLoader.loadContent('pages/MainPage') 78 pageLoader.loadContent('pages/MainPage')
79 .then(() => { 79 .then(() => {
80 - // TODO 事件推荐调用 80 + ProcessUtils.gotoMorningEveningPaper()
81 resolve({ 81 resolve({
82 code: 0, 82 code: 0,
83 result: { 83 result: {