Showing
3 changed files
with
16 additions
and
3 deletions
| @@ -9,6 +9,8 @@ import { ContentDetailDTO } from 'wdBean/Index' | @@ -9,6 +9,8 @@ import { ContentDetailDTO } from 'wdBean/Index' | ||
| 9 | export struct CommentTabComponent { | 9 | export struct CommentTabComponent { |
| 10 | private onCommentFocus: () => void = () => { | 10 | private onCommentFocus: () => void = () => { |
| 11 | } | 11 | } |
| 12 | + private onLoad: (dialogController: CustomDialogController) => void = () => { | ||
| 13 | + } | ||
| 12 | @ObjectLink publishCommentModel: publishCommentModel | 14 | @ObjectLink publishCommentModel: publishCommentModel |
| 13 | @Prop contentDetail: ContentDetailDTO | 15 | @Prop contentDetail: ContentDetailDTO |
| 14 | @Prop pageComponentType: number = -1 //1:视频详情页 2:竖屏直播页 | 16 | @Prop pageComponentType: number = -1 //1:视频详情页 2:竖屏直播页 |
| @@ -41,6 +43,8 @@ export struct CommentTabComponent { | @@ -41,6 +43,8 @@ export struct CommentTabComponent { | ||
| 41 | backgroundColor: "#50000000", | 43 | backgroundColor: "#50000000", |
| 42 | }) | 44 | }) |
| 43 | 45 | ||
| 46 | + this.onLoad(this.dialogController) | ||
| 47 | + | ||
| 44 | } | 48 | } |
| 45 | 49 | ||
| 46 | getCommentInputBackImg() { | 50 | getCommentInputBackImg() { |
| @@ -119,7 +123,6 @@ export struct CommentTabComponent { | @@ -119,7 +123,6 @@ export struct CommentTabComponent { | ||
| 119 | if (this.contentDetail.bestNoticer === 1) { | 123 | if (this.contentDetail.bestNoticer === 1) { |
| 120 | this.publishCommentModel.placeHolderText = "优质评论会获得最佳评论人的称号" | 124 | this.publishCommentModel.placeHolderText = "优质评论会获得最佳评论人的称号" |
| 121 | } | 125 | } |
| 122 | - | ||
| 123 | this.dialogController?.open(); | 126 | this.dialogController?.open(); |
| 124 | }) | 127 | }) |
| 125 | } | 128 | } |
| @@ -156,7 +159,7 @@ export struct CommentIconComponent { | @@ -156,7 +159,7 @@ export struct CommentIconComponent { | ||
| 156 | // Stack({alignContent:Alignment.Start}) { | 159 | // Stack({alignContent:Alignment.Start}) { |
| 157 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { | 160 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { |
| 158 | RelativeContainer() { | 161 | RelativeContainer() { |
| 159 | - Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg'):$r('app.media.ic_like_back_Select')) | 162 | + Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select')) |
| 160 | .objectFit(ImageFit.Fill) | 163 | .objectFit(ImageFit.Fill) |
| 161 | .resizable({ | 164 | .resizable({ |
| 162 | slice: { | 165 | slice: { |
| @@ -83,6 +83,7 @@ export struct OperRowListView { | @@ -83,6 +83,7 @@ export struct OperRowListView { | ||
| 83 | private AudioSuspension = new AudioSuspensionModel() | 83 | private AudioSuspension = new AudioSuspensionModel() |
| 84 | @State currentStatus: number | string | undefined = 0; | 84 | @State currentStatus: number | string | undefined = 0; |
| 85 | @State name: string = 'audio_recommend_status_wait' | 85 | @State name: string = 'audio_recommend_status_wait' |
| 86 | + @State dialogController: CustomDialogController | null = null; | ||
| 86 | 87 | ||
| 87 | async aboutToAppear() { | 88 | async aboutToAppear() { |
| 88 | console.info(TAG, '22222----', this.styleType) | 89 | console.info(TAG, '22222----', this.styleType) |
| @@ -207,6 +208,9 @@ export struct OperRowListView { | @@ -207,6 +208,9 @@ export struct OperRowListView { | ||
| 207 | contentDetail: this.contentDetailData, | 208 | contentDetail: this.contentDetailData, |
| 208 | onCommentFocus: this.onCommentFocus, | 209 | onCommentFocus: this.onCommentFocus, |
| 209 | pageComponentType: this.pageComponentType, | 210 | pageComponentType: this.pageComponentType, |
| 211 | + onLoad: (dialogController: CustomDialogController) => { | ||
| 212 | + this.dialogController = dialogController | ||
| 213 | + } | ||
| 210 | }) | 214 | }) |
| 211 | } | 215 | } |
| 212 | } | 216 | } |
| @@ -222,6 +226,11 @@ export struct OperRowListView { | @@ -222,6 +226,11 @@ export struct OperRowListView { | ||
| 222 | CommentIconComponent({ publishCommentModel: this.publishCommentModel, styleType: this.styleType }) | 226 | CommentIconComponent({ publishCommentModel: this.publishCommentModel, styleType: this.styleType }) |
| 223 | .onClick(() => { | 227 | .onClick(() => { |
| 224 | this.onCommentIconClick() | 228 | this.onCommentIconClick() |
| 229 | + | ||
| 230 | + console.log(JSON.stringify(this.dialogController?.open)) | ||
| 231 | + | ||
| 232 | + // 评论弹框内部嵌入 | ||
| 233 | + !this.showBackIcon && this.dialogController?.open() | ||
| 225 | }) | 234 | }) |
| 226 | } | 235 | } |
| 227 | } | 236 | } |
| @@ -290,7 +299,8 @@ export struct OperRowListView { | @@ -290,7 +299,8 @@ export struct OperRowListView { | ||
| 290 | @Builder | 299 | @Builder |
| 291 | builderListen() { | 300 | builderListen() { |
| 292 | Column() { | 301 | Column() { |
| 293 | - Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.icon_voice_playing") : $r("app.media.icon_listen")) | 302 | + Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.icon_voice_playing") : |
| 303 | + $r("app.media.icon_listen")) | ||
| 294 | .width(24) | 304 | .width(24) |
| 295 | .height(24) | 305 | .height(24) |
| 296 | .aspectRatio(1) | 306 | .aspectRatio(1) |
-
Please register or login to post a comment