Showing
7 changed files
with
56 additions
and
32 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
| @@ -37,21 +37,21 @@ export struct QualityCommentsComponent { | @@ -37,21 +37,21 @@ export struct QualityCommentsComponent { | ||
| 37 | aboutToDisappear(): void { | 37 | aboutToDisappear(): void { |
| 38 | // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) | 38 | // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) |
| 39 | this.dialogController = null // 将dialogController置空 | 39 | this.dialogController = null // 将dialogController置空 |
| 40 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 40 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | onPageShow(): void { | 43 | onPageShow(): void { |
| 44 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 44 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | onPageHide(): void { | 47 | onPageHide(): void { |
| 48 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 48 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | aboutToAppear(): void { | 51 | aboutToAppear(): void { |
| 52 | this.getData(); | 52 | this.getData(); |
| 53 | this.showAlert() | 53 | this.showAlert() |
| 54 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 54 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | showAlert() { | 57 | showAlert() { |
| @@ -106,6 +106,7 @@ export struct QualityCommentsComponent { | @@ -106,6 +106,7 @@ export struct QualityCommentsComponent { | ||
| 106 | Image($r('app.media.comment_img_banner')).width('100%') | 106 | Image($r('app.media.comment_img_banner')).width('100%') |
| 107 | .height(283) | 107 | .height(283) |
| 108 | // .aspectRatio(375 / 283); | 108 | // .aspectRatio(375 / 283); |
| 109 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 109 | } | 110 | } |
| 110 | .onAreaChange((oldValue: Area, newValue: Area) => { | 111 | .onAreaChange((oldValue: Area, newValue: Area) => { |
| 111 | if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) { | 112 | if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) { |
| @@ -156,13 +157,15 @@ export struct QualityCommentsComponent { | @@ -156,13 +157,15 @@ export struct QualityCommentsComponent { | ||
| 156 | /*导航栏*/ | 157 | /*导航栏*/ |
| 157 | @Builder | 158 | @Builder |
| 158 | TabbarNormal() { | 159 | TabbarNormal() { |
| 159 | - Column() { | 160 | + Stack({ alignContent: Alignment.Top }) { |
| 160 | Row() { | 161 | Row() { |
| 161 | } | 162 | } |
| 162 | .width('100%') | 163 | .width('100%') |
| 163 | .height(px2vp(this.topSafeHeight)) | 164 | .height(px2vp(this.topSafeHeight)) |
| 164 | .backgroundColor($r('app.color.white')) | 165 | .backgroundColor($r('app.color.white')) |
| 165 | .opacity(this.tileOpacity) | 166 | .opacity(this.tileOpacity) |
| 167 | + .visibility(this.tileOpacity > 0 ? 0 : 1) | ||
| 168 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 166 | 169 | ||
| 167 | Stack({ alignContent: Alignment.Start }) { | 170 | Stack({ alignContent: Alignment.Start }) { |
| 168 | Row() { | 171 | Row() { |
| @@ -173,6 +176,7 @@ export struct QualityCommentsComponent { | @@ -173,6 +176,7 @@ export struct QualityCommentsComponent { | ||
| 173 | .fontWeight(400) | 176 | .fontWeight(400) |
| 174 | .fontColor($r('app.color.color_222222')) | 177 | .fontColor($r('app.color.color_222222')) |
| 175 | .lineHeight('42lpx') | 178 | .lineHeight('42lpx') |
| 179 | + .visibility(this.tileOpacity < 0.8 ? 1 : 0) | ||
| 176 | } | 180 | } |
| 177 | .height(44) | 181 | .height(44) |
| 178 | .width('100%') | 182 | .width('100%') |
| @@ -218,6 +222,7 @@ export struct QualityCommentsComponent { | @@ -218,6 +222,7 @@ export struct QualityCommentsComponent { | ||
| 218 | .scrollBar(BarState.Off) | 222 | .scrollBar(BarState.Off) |
| 219 | .edgeEffect(EdgeEffect.None) | 223 | .edgeEffect(EdgeEffect.None) |
| 220 | 224 | ||
| 225 | + .clip(false) | ||
| 221 | // this.TabbarTransparent() | 226 | // this.TabbarTransparent() |
| 222 | this.TabbarNormal() | 227 | this.TabbarNormal() |
| 223 | } | 228 | } |
| @@ -253,7 +258,7 @@ export struct QualityCommentsComponent { | @@ -253,7 +258,7 @@ export struct QualityCommentsComponent { | ||
| 253 | this.currentPage++ | 258 | this.currentPage++ |
| 254 | this.getData() | 259 | this.getData() |
| 255 | }) | 260 | }) |
| 256 | - .margin({ top: 196 }) | 261 | + .margin({ top: 196 - px2vp(this.topSafeHeight) }) |
| 257 | .height("100%") | 262 | .height("100%") |
| 258 | .width("100%") | 263 | .width("100%") |
| 259 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 | 264 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 |
| @@ -463,12 +468,12 @@ struct QualityCommentItem { | @@ -463,12 +468,12 @@ struct QualityCommentItem { | ||
| 463 | jumpToAccountOwner() { | 468 | jumpToAccountOwner() { |
| 464 | 469 | ||
| 465 | commentViewModel.jumpToAccountPage(this.item, () => { | 470 | commentViewModel.jumpToAccountPage(this.item, () => { |
| 466 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 471 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 467 | }) | 472 | }) |
| 468 | } | 473 | } |
| 469 | 474 | ||
| 470 | jumpToDetail() { | 475 | jumpToDetail() { |
| 471 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 476 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 472 | // programInfoModel.api_isCommentAction = YES; | 477 | // programInfoModel.api_isCommentAction = YES; |
| 473 | let content = new ContentDTO() | 478 | let content = new ContentDTO() |
| 474 | content.objectId = this.item.targetId; | 479 | content.objectId = this.item.targetId; |
| @@ -501,7 +506,7 @@ struct QualityCommentItem { | @@ -501,7 +506,7 @@ struct QualityCommentItem { | ||
| 501 | // 未登录,跳转登录 | 506 | // 未登录,跳转登录 |
| 502 | const user_id = HttpUtils.getUserId() | 507 | const user_id = HttpUtils.getUserId() |
| 503 | if (!user_id) { | 508 | if (!user_id) { |
| 504 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 509 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 505 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 510 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 506 | return | 511 | return |
| 507 | } | 512 | } |
| @@ -73,13 +73,19 @@ export struct ZhGridLayout03 { | @@ -73,13 +73,19 @@ export struct ZhGridLayout03 { | ||
| 73 | bottom:11 | 73 | bottom:11 |
| 74 | }) | 74 | }) |
| 75 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 75 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 76 | + | ||
| 76 | } | 77 | } |
| 77 | .width('100%') | 78 | .width('100%') |
| 78 | .onClick((event: ClickEvent) => { | 79 | .onClick((event: ClickEvent) => { |
| 80 | + console.log('333rt',JSON.stringify(item)) | ||
| 79 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | 81 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) |
| 80 | if (item.objectType === '11') { | 82 | if (item.objectType === '11') { |
| 83 | + ProcessUtils.jumpExternalWebPage | ||
| 81 | ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle) | 84 | ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle) |
| 82 | - } else { | 85 | + } else if(item.objectType === '6'){ |
| 86 | + ProcessUtils.jumpExternalWebPage(item.linkUrl) | ||
| 87 | + //ProcessUtils.gotoWeb(item); | ||
| 88 | + }else{ | ||
| 83 | ProcessUtils.processPage(item) | 89 | ProcessUtils.processPage(item) |
| 84 | } | 90 | } |
| 85 | }) | 91 | }) |
| @@ -5,11 +5,11 @@ import { QualityCommentsComponent } from '../comment/view/QualityCommentsCompone | @@ -5,11 +5,11 @@ import { QualityCommentsComponent } from '../comment/view/QualityCommentsCompone | ||
| 5 | @Component | 5 | @Component |
| 6 | struct QualityCommentsPage { | 6 | struct QualityCommentsPage { |
| 7 | onPageShow(): void { | 7 | onPageShow(): void { |
| 8 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 8 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | onPageHide(): void { | 11 | onPageHide(): void { |
| 12 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 12 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | build() { | 15 | build() { |
| @@ -114,17 +114,6 @@ export struct OperRowListView { | @@ -114,17 +114,6 @@ export struct OperRowListView { | ||
| 114 | } | 114 | } |
| 115 | }) | 115 | }) |
| 116 | this.contentTrackingDict() | 116 | this.contentTrackingDict() |
| 117 | - | ||
| 118 | - // 2:竖屏直播页 3:图集 4:横屏直播页 | ||
| 119 | - if(this.pageComponentType == 2 || this.pageComponentType == 4) { | ||
| 120 | - // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 | ||
| 121 | - this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle | ||
| 122 | - this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false | ||
| 123 | - } else { | ||
| 124 | - // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | ||
| 125 | - this.likesStyle = this.contentDetailData.likesStyle | ||
| 126 | - this.openLikes = this.contentDetailData.openLikes == 1 ? true : false | ||
| 127 | - } | ||
| 128 | } | 117 | } |
| 129 | 118 | ||
| 130 | contentTrackingDict(){ | 119 | contentTrackingDict(){ |
| @@ -198,6 +187,16 @@ export struct OperRowListView { | @@ -198,6 +187,16 @@ export struct OperRowListView { | ||
| 198 | console.log(TAG, 'this.audioUrl+++', this.audioUrl) | 187 | console.log(TAG, 'this.audioUrl+++', this.audioUrl) |
| 199 | console.log(TAG, 'this.audioTitle+++', this.audioTitle) | 188 | console.log(TAG, 'this.audioTitle+++', this.audioTitle) |
| 200 | } | 189 | } |
| 190 | + // 2:竖屏直播页 3:图集 4:横屏直播页 | ||
| 191 | + if(this.pageComponentType == 2 || this.pageComponentType == 4) { | ||
| 192 | + // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 | ||
| 193 | + this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle | ||
| 194 | + this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false | ||
| 195 | + } else { | ||
| 196 | + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | ||
| 197 | + this.likesStyle = this.contentDetailData.likesStyle | ||
| 198 | + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false | ||
| 199 | + } | ||
| 201 | } | 200 | } |
| 202 | 201 | ||
| 203 | build() { | 202 | build() { |
| @@ -49,6 +49,7 @@ export struct MultiPictureListPage { | @@ -49,6 +49,7 @@ export struct MultiPictureListPage { | ||
| 49 | left: { anchor: "__container__", align: HorizontalAlign.Start } | 49 | left: { anchor: "__container__", align: HorizontalAlign.Start } |
| 50 | }) | 50 | }) |
| 51 | .onClick(() => { | 51 | .onClick(() => { |
| 52 | + this.onBack(); | ||
| 52 | router.back(); | 53 | router.back(); |
| 53 | }) | 54 | }) |
| 54 | .id("backImg") | 55 | .id("backImg") |
| @@ -134,7 +135,7 @@ export struct MultiPictureListPage { | @@ -134,7 +135,7 @@ export struct MultiPictureListPage { | ||
| 134 | } | 135 | } |
| 135 | .width('100%') | 136 | .width('100%') |
| 136 | .height('100%') | 137 | .height('100%') |
| 137 | - .padding({top:$r('app.float.margin_44')}) | 138 | + // .padding({top:$r('app.float.margin_44')}) |
| 138 | .backgroundColor(Color.Black) | 139 | .backgroundColor(Color.Black) |
| 139 | .id('e_picture_container') | 140 | .id('e_picture_container') |
| 140 | // 设置顶部绘制延伸到状态栏 | 141 | // 设置顶部绘制延伸到状态栏 |
| @@ -148,7 +149,7 @@ export struct MultiPictureListPage { | @@ -148,7 +149,7 @@ export struct MultiPictureListPage { | ||
| 148 | */ | 149 | */ |
| 149 | openFullScreen() { | 150 | openFullScreen() { |
| 150 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | 151 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) |
| 151 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 152 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 152 | // WindowModel.shared.setWindowSystemBarEnable([]) | 153 | // WindowModel.shared.setWindowSystemBarEnable([]) |
| 153 | } | 154 | } |
| 154 | 155 | ||
| @@ -163,7 +164,16 @@ export struct MultiPictureListPage { | @@ -163,7 +164,16 @@ export struct MultiPictureListPage { | ||
| 163 | */ | 164 | */ |
| 164 | closeFullScreen() { | 165 | closeFullScreen() { |
| 165 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | 166 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) |
| 166 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 167 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 167 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) | 168 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) |
| 168 | } | 169 | } |
| 170 | + | ||
| 171 | + onBackPress(): boolean | void { | ||
| 172 | + this.onBack() | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + private onBack() { | ||
| 176 | + // 提前设置,否则返回的页面展示有问题(有时延) | ||
| 177 | + this.closeFullScreen() | ||
| 178 | + } | ||
| 169 | } | 179 | } |
| @@ -37,10 +37,14 @@ export struct PlayerRightView { | @@ -37,10 +37,14 @@ export struct PlayerRightView { | ||
| 37 | @Consume showCommentList: boolean | 37 | @Consume showCommentList: boolean |
| 38 | @Consume displayDirection: DisplayDirection | 38 | @Consume displayDirection: DisplayDirection |
| 39 | @Consume publishCommentModel: publishCommentModel | 39 | @Consume publishCommentModel: publishCommentModel |
| 40 | - @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | ||
| 41 | - | 40 | + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 41 | + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | ||
| 42 | aboutToAppear() { | 42 | aboutToAppear() { |
| 43 | - | 43 | + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 44 | + this.likesStyle = this.contentDetailData.likesStyle | ||
| 45 | + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false | ||
| 46 | + // console.log(TAG, 'this.likesStyle', this.likesStyle) | ||
| 47 | + // console.log(TAG, 'this.openLikes', this.openLikes) | ||
| 44 | } | 48 | } |
| 45 | 49 | ||
| 46 | /** | 50 | /** |
| @@ -299,7 +303,7 @@ export struct PlayerRightView { | @@ -299,7 +303,7 @@ export struct PlayerRightView { | ||
| 299 | .margin({ top: 2 }) | 303 | .margin({ top: 2 }) |
| 300 | } | 304 | } |
| 301 | .margin({ bottom: 20 }) | 305 | .margin({ bottom: 20 }) |
| 302 | - .visibility(this.likesStyle !== 4 ? Visibility.Visible : Visibility.None) | 306 | + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible) |
| 303 | .onClick(() => { | 307 | .onClick(() => { |
| 304 | // TODO:点赞动画 | 308 | // TODO:点赞动画 |
| 305 | this.toggleLikeStatus() | 309 | this.toggleLikeStatus() |
| @@ -91,7 +91,7 @@ struct MultiPictureDetailPage { | @@ -91,7 +91,7 @@ struct MultiPictureDetailPage { | ||
| 91 | */ | 91 | */ |
| 92 | openFullScreen() { | 92 | openFullScreen() { |
| 93 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | 93 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) |
| 94 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 94 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 95 | // WindowModel.shared.setWindowSystemBarEnable([]) | 95 | // WindowModel.shared.setWindowSystemBarEnable([]) |
| 96 | } | 96 | } |
| 97 | 97 | ||
| @@ -101,7 +101,7 @@ struct MultiPictureDetailPage { | @@ -101,7 +101,7 @@ struct MultiPictureDetailPage { | ||
| 101 | */ | 101 | */ |
| 102 | closeFullScreen() { | 102 | closeFullScreen() { |
| 103 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | 103 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) |
| 104 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 104 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 105 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) | 105 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) |
| 106 | } | 106 | } |
| 107 | 107 |
-
Please register or login to post a comment