Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: fix:1)电子报-电子报最后一版进入读报纸列表后_未展示该版内容 fix:1)电子报-电子报最后一版进入读报纸列表后_未展示该版内容 fix(17084): UI还原问题-【生产环境】进度条上圆点与android不一致看图 电子报newspaper_shadow优化 fix:1)电子报-电子报最后一版进入读报纸列表后_未展示该版内容 fix(16650): 功能缺陷--进入横屏直播页,全屏后,点击分享按钮没有反应
Showing
8 changed files
with
86 additions
and
46 deletions
| @@ -60,10 +60,11 @@ export struct ENewspaperPageComponent { | @@ -60,10 +60,11 @@ export struct ENewspaperPageComponent { | ||
| 60 | //watch监听报纸页码回调 | 60 | //watch监听报纸页码回调 |
| 61 | onCurrentPageNumUpdated(): void { | 61 | onCurrentPageNumUpdated(): void { |
| 62 | console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) | 62 | console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) |
| 63 | - let _swiperIndex = Number.parseInt(this.currentPageNum) | ||
| 64 | - console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex) | ||
| 65 | - this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex | 63 | + // let _swiperIndex = Number.parseInt(this.currentPageNum) |
| 64 | + // console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex) | ||
| 65 | + // this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex | ||
| 66 | 66 | ||
| 67 | + this.swiperIndex = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum) | ||
| 67 | //电子报--版面序号选择点击 | 68 | //电子报--版面序号选择点击 |
| 68 | TrackingContent.clickWithEvent('panel_number_selection_click', TrackConstants.PageName.NewsPaperPage, | 69 | TrackingContent.clickWithEvent('panel_number_selection_click', TrackConstants.PageName.NewsPaperPage, |
| 69 | TrackConstants.PageName.NewsPaperPage | 70 | TrackConstants.PageName.NewsPaperPage |
| @@ -140,7 +141,8 @@ export struct ENewspaperPageComponent { | @@ -140,7 +141,8 @@ export struct ENewspaperPageComponent { | ||
| 140 | let screenHeight = this.displayTool.height; | 141 | let screenHeight = this.displayTool.height; |
| 141 | // bottomSafeHeight 底导高度 topSafeHeight 顶导高度 44 顶部高度 60 底部高度 | 142 | // bottomSafeHeight 底导高度 topSafeHeight 顶导高度 44 顶部高度 60 底部高度 |
| 142 | // newspaper_shadow 49 高度 e_newspaper_content 59 margin top | 143 | // newspaper_shadow 49 高度 e_newspaper_content 59 margin top |
| 143 | - let height = screenHeight - this.bottomSafeHeight - this.topSafeHeight - vp2px(44) - vp2px(60) - vp2px(49) -vp2px(59) | 144 | + let height = |
| 145 | + screenHeight - this.bottomSafeHeight - this.topSafeHeight - vp2px(44) - vp2px(60) - vp2px(49) - vp2px(59) | ||
| 144 | this.picHeight = height | 146 | this.picHeight = height |
| 145 | 147 | ||
| 146 | let ratio = this.ratio == '100%' ? 1 : 0.5 | 148 | let ratio = this.ratio == '100%' ? 1 : 0.5 |
| @@ -176,6 +178,7 @@ export struct ENewspaperPageComponent { | @@ -176,6 +178,7 @@ export struct ENewspaperPageComponent { | ||
| 176 | this.resize() | 178 | this.resize() |
| 177 | }); | 179 | }); |
| 178 | } | 180 | } |
| 181 | + | ||
| 179 | resize() { | 182 | resize() { |
| 180 | this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.displayTool.width | 183 | this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.displayTool.width |
| 181 | // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 | 184 | // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 |
| @@ -296,13 +299,13 @@ export struct ENewspaperPageComponent { | @@ -296,13 +299,13 @@ export struct ENewspaperPageComponent { | ||
| 296 | Row() { | 299 | Row() { |
| 297 | Image($r('app.media.newspaper_shadow')) | 300 | Image($r('app.media.newspaper_shadow')) |
| 298 | .height($r('app.float.vp_12')) | 301 | .height($r('app.float.vp_12')) |
| 299 | - .width('100%') | 302 | + .width(px2vp(this.picWidth)) |
| 300 | .objectFit(ImageFit.Contain) | 303 | .objectFit(ImageFit.Contain) |
| 301 | 304 | ||
| 302 | - }.margin({ top: -1,left: 10, right: 10 }).alignRules({ | 305 | + }.margin({ top: -1 }).alignRules({ |
| 303 | top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom }, | 306 | top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom }, |
| 304 | - // left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start }, | ||
| 305 | - // right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End } | 307 | + left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start }, |
| 308 | + right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End } | ||
| 306 | }) | 309 | }) |
| 307 | .id('e_newspaper_shadow') | 310 | .id('e_newspaper_shadow') |
| 308 | 311 |
| @@ -122,7 +122,6 @@ export default struct TemplatePageComponent { | @@ -122,7 +122,6 @@ export default struct TemplatePageComponent { | ||
| 122 | LazyForEach(this.templatePage.compList, (compDTO: CompDTO, index: number) => { | 122 | LazyForEach(this.templatePage.compList, (compDTO: CompDTO, index: number) => { |
| 123 | ListItem() { | 123 | ListItem() { |
| 124 | Column() { | 124 | Column() { |
| 125 | - | ||
| 126 | CompParser({ | 125 | CompParser({ |
| 127 | compDTO: compDTO, | 126 | compDTO: compDTO, |
| 128 | nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO, | 127 | nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO, |
| @@ -5,6 +5,8 @@ import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' | @@ -5,6 +5,8 @@ import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' | ||
| 5 | import { Logger } from 'wdKit'; | 5 | import { Logger } from 'wdKit'; |
| 6 | import { font, window } from '@kit.ArkUI'; | 6 | import { font, window } from '@kit.ArkUI'; |
| 7 | 7 | ||
| 8 | +const TAG: string = 'ENewspaperListDialog'; | ||
| 9 | + | ||
| 8 | /** | 10 | /** |
| 9 | * 读报纸半屏弹窗 | 11 | * 读报纸半屏弹窗 |
| 10 | * 弹窗嵌套参考资料(https://developer.harmonyos.com/cn/docs/documentation/doc-references-V2/ts-methods-custom-dialog-box-0000001580345722-V2) | 12 | * 弹窗嵌套参考资料(https://developer.harmonyos.com/cn/docs/documentation/doc-references-V2/ts-methods-custom-dialog-box-0000001580345722-V2) |
| @@ -18,13 +20,15 @@ export struct ENewspaperListDialog { | @@ -18,13 +20,15 @@ export struct ENewspaperListDialog { | ||
| 18 | private listScroller: Scroller = new Scroller() | 20 | private listScroller: Scroller = new Scroller() |
| 19 | @State scrollOffset: number = 0 | 21 | @State scrollOffset: number = 0 |
| 20 | @State isCurrentViewOpen: boolean = false | 22 | @State isCurrentViewOpen: boolean = false |
| 21 | - @Consume bottomSafeHeight:number | 23 | + @Consume bottomSafeHeight: number |
| 22 | //文字版选择弹框 | 24 | //文字版选择弹框 |
| 23 | pageListDialogController: CustomDialogController = new CustomDialogController({ | 25 | pageListDialogController: CustomDialogController = new CustomDialogController({ |
| 24 | builder: ENewspaperPageDialog({ | 26 | builder: ENewspaperPageDialog({ |
| 25 | dialogType: 1, | 27 | dialogType: 1, |
| 26 | newspaperListBean: this.newspaperListBean, | 28 | newspaperListBean: this.newspaperListBean, |
| 27 | dialogVisibility: (visibility: boolean) => { | 29 | dialogVisibility: (visibility: boolean) => { |
| 30 | + | ||
| 31 | + console.log(TAG, "ENewspaperPageDialog visibility:", visibility) | ||
| 28 | this.isCurrentViewOpen = !visibility | 32 | this.isCurrentViewOpen = !visibility |
| 29 | } | 33 | } |
| 30 | }), | 34 | }), |
| @@ -38,23 +42,36 @@ export struct ENewspaperListDialog { | @@ -38,23 +42,36 @@ export struct ENewspaperListDialog { | ||
| 38 | // 那么此处需要将指向自己的controller放在所有controller的后面 | 42 | // 那么此处需要将指向自己的controller放在所有controller的后面 |
| 39 | // listDialogController: CustomDialogController | 43 | // listDialogController: CustomDialogController |
| 40 | public closeDialog?: () => void | 44 | public closeDialog?: () => void |
| 41 | - | ||
| 42 | // 手势滑动相关 | 45 | // 手势滑动相关 |
| 43 | private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down }) | 46 | private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down }) |
| 44 | private topFixedHeight = 124 | 47 | private topFixedHeight = 124 |
| 45 | @State topHeight: number = 124 | 48 | @State topHeight: number = 124 |
| 46 | private deviceHeight: number = 0 | 49 | private deviceHeight: number = 0 |
| 47 | 50 | ||
| 51 | + | ||
| 52 | + selectPageNum : boolean = true | ||
| 53 | + | ||
| 48 | //watch监听报纸页码回调 | 54 | //watch监听报纸页码回调 |
| 49 | onCurrentPageNumUpdated(): void { | 55 | onCurrentPageNumUpdated(): void { |
| 50 | - console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) | ||
| 51 | - let _scrollIndex = Number.parseInt(this.currentPageNum) | ||
| 52 | - console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "_scrollIndex:", _scrollIndex) | ||
| 53 | - let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | 56 | + // console.log(TAG, "onCurrentPageNumUpdated currentPageNum:", this.currentPageNum) |
| 57 | + // let _scrollIndex = Number.parseInt(this.currentPageNum) | ||
| 58 | + // console.log(TAG, "onCurrentPageNumUpdated _scrollIndex:", _scrollIndex) | ||
| 59 | + // let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | ||
| 60 | + | ||
| 61 | + if (this.newspaperListBean != undefined) { | ||
| 62 | + | ||
| 63 | + this.selectPageNum = false | ||
| 64 | + // 从业务数据中找到编号 | ||
| 65 | + let scrollIndexEnd = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum) | ||
| 66 | + | ||
| 67 | + console.log(TAG, "onCurrentPageNumUpdated scrollIndexEnd:", scrollIndexEnd) | ||
| 68 | + | ||
| 69 | + console.log(TAG, "onCurrentPageNumUpdated (!this.isCurrentViewOpen):", "" + !this.isCurrentViewOpen) | ||
| 54 | if (!this.isCurrentViewOpen) { | 70 | if (!this.isCurrentViewOpen) { |
| 55 | this.listScroller.scrollToIndex(scrollIndexEnd) | 71 | this.listScroller.scrollToIndex(scrollIndexEnd) |
| 56 | } | 72 | } |
| 57 | } | 73 | } |
| 74 | + } | ||
| 58 | 75 | ||
| 59 | async aboutToAppear() { | 76 | async aboutToAppear() { |
| 60 | //注册字体 | 77 | //注册字体 |
| @@ -69,11 +86,13 @@ export struct ENewspaperListDialog { | @@ -69,11 +86,13 @@ export struct ENewspaperListDialog { | ||
| 69 | this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight | 86 | this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight |
| 70 | 87 | ||
| 71 | this.isCurrentViewOpen = true | 88 | this.isCurrentViewOpen = true |
| 72 | - console.log("ENewspaperListDialog-aboutToAppear", "currentPageNum:", this.currentPageNum) | ||
| 73 | - let _scrollIndex = Number.parseInt(this.currentPageNum) | ||
| 74 | - console.log("ENewspaperListDialog-aboutToAppear", "_scrollIndex:", _scrollIndex) | ||
| 75 | - this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | 89 | + console.log(TAG, "aboutToAppear currentPageNum:", this.currentPageNum) |
| 90 | + // let _scrollIndex = Number.parseInt(this.currentPageNum) | ||
| 91 | + // console.log(TAG, "aboutToAppear _scrollIndex:", _scrollIndex) | ||
| 92 | + // this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | ||
| 76 | // this.listScroller.scrollToIndex(this.scrollIndex) | 93 | // this.listScroller.scrollToIndex(this.scrollIndex) |
| 94 | + | ||
| 95 | + this.scrollIndex = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum) | ||
| 77 | } | 96 | } |
| 78 | 97 | ||
| 79 | aboutToDisappear() { | 98 | aboutToDisappear() { |
| @@ -134,7 +153,7 @@ export struct ENewspaperListDialog { | @@ -134,7 +153,7 @@ export struct ENewspaperListDialog { | ||
| 134 | .gesture( | 153 | .gesture( |
| 135 | PanGesture(this.panOption) | 154 | PanGesture(this.panOption) |
| 136 | .onActionStart((event: GestureEvent) => { | 155 | .onActionStart((event: GestureEvent) => { |
| 137 | - Logger.debug('ENewspaperListDialog','Pan start') | 156 | + Logger.debug('ENewspaperListDialog', 'Pan start') |
| 138 | }) | 157 | }) |
| 139 | .onActionUpdate((event: GestureEvent) => { | 158 | .onActionUpdate((event: GestureEvent) => { |
| 140 | if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) { | 159 | if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) { |
| @@ -173,8 +192,7 @@ export struct ENewspaperListDialog { | @@ -173,8 +192,7 @@ export struct ENewspaperListDialog { | ||
| 173 | Text(positionItem.shortTitle) | 192 | Text(positionItem.shortTitle) |
| 174 | .fontSize($r('app.float.font_size_13')) | 193 | .fontSize($r('app.float.font_size_13')) |
| 175 | .fontColor($r('app.color.color_222222')) | 194 | .fontColor($r('app.color.color_222222')) |
| 176 | - .fontWeight(600) | ||
| 177 | - // .maxLines(2) | 195 | + .fontWeight(600)// .maxLines(2) |
| 178 | .margin({ | 196 | .margin({ |
| 179 | bottom: 8 | 197 | bottom: 8 |
| 180 | }) | 198 | }) |
| @@ -278,25 +296,29 @@ export struct ENewspaperListDialog { | @@ -278,25 +296,29 @@ export struct ENewspaperListDialog { | ||
| 278 | console.info('ENewspaperListDialog::first' + firstIndex) | 296 | console.info('ENewspaperListDialog::first' + firstIndex) |
| 279 | console.info('ENewspaperListDialog::last' + lastIndex) | 297 | console.info('ENewspaperListDialog::last' + lastIndex) |
| 280 | console.info('ENewspaperListDialog::center' + centerIndex) | 298 | console.info('ENewspaperListDialog::center' + centerIndex) |
| 281 | - // this.updateCurrentPageNum(firstIndex) | ||
| 282 | - // const tempIndex = this.findClassIndex(firstIndex) | ||
| 283 | - // if (firstIndex !== centerIndex) { | ||
| 284 | - // return | ||
| 285 | - // } | ||
| 286 | - // console.info(`this.scrollOffset:` + this.scrollOffset) | ||
| 287 | - // if (this.scrollOffset == 0) { | ||
| 288 | - this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}` | ||
| 289 | - // } | 299 | + |
| 300 | + // this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}` | ||
| 301 | + | ||
| 302 | + if(this.selectPageNum){ | ||
| 303 | + if (this.newspaperListBean != undefined) { | ||
| 304 | + this.currentPageNum = this.newspaperListBean?.list[lastIndex].pageNum | ||
| 305 | + } | ||
| 306 | + }else { | ||
| 307 | + this.selectPageNum = true | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + | ||
| 290 | }) | 311 | }) |
| 291 | } | 312 | } |
| 292 | .margin({ top: this.topHeight }) | 313 | .margin({ top: this.topHeight }) |
| 293 | .width('100%') | 314 | .width('100%') |
| 294 | .backgroundColor(Color.White) | 315 | .backgroundColor(Color.White) |
| 295 | 316 | ||
| 296 | - }.width('100%') | 317 | + } |
| 318 | + .width('100%') | ||
| 297 | .height('100%') | 319 | .height('100%') |
| 298 | .backgroundColor('#80000000') | 320 | .backgroundColor('#80000000') |
| 299 | - .margin({bottom:50}) | 321 | + .margin({ bottom: 50 }) |
| 300 | .onClick(() => { | 322 | .onClick(() => { |
| 301 | if (this.closeDialog) { | 323 | if (this.closeDialog) { |
| 302 | this.closeDialog() | 324 | this.closeDialog() |
| @@ -305,7 +327,7 @@ export struct ENewspaperListDialog { | @@ -305,7 +327,7 @@ export struct ENewspaperListDialog { | ||
| 305 | .gesture( | 327 | .gesture( |
| 306 | PanGesture(this.panOption) | 328 | PanGesture(this.panOption) |
| 307 | .onActionStart((event: GestureEvent) => { | 329 | .onActionStart((event: GestureEvent) => { |
| 308 | - Logger.debug('ENewspaperListDialog','Pan start') | 330 | + Logger.debug('ENewspaperListDialog', 'Pan start') |
| 309 | }) | 331 | }) |
| 310 | .onActionUpdate((event: GestureEvent) => { | 332 | .onActionUpdate((event: GestureEvent) => { |
| 311 | if (event) { | 333 | if (event) { |
| @@ -322,7 +344,7 @@ export struct ENewspaperListDialog { | @@ -322,7 +344,7 @@ export struct ENewspaperListDialog { | ||
| 322 | } | 344 | } |
| 323 | 345 | ||
| 324 | onCloseGestureDialog() { | 346 | onCloseGestureDialog() { |
| 325 | - if (this.topHeight >= this.deviceHeight ) { | 347 | + if (this.topHeight >= this.deviceHeight) { |
| 326 | if (this.closeDialog) { | 348 | if (this.closeDialog) { |
| 327 | this.closeDialog() | 349 | this.closeDialog() |
| 328 | } | 350 | } |
| @@ -12,7 +12,7 @@ export struct ENewspaperPageDialog { | @@ -12,7 +12,7 @@ export struct ENewspaperPageDialog { | ||
| 12 | public dialogVisibility?: (visibility: boolean) => void | 12 | public dialogVisibility?: (visibility: boolean) => void |
| 13 | 13 | ||
| 14 | onCurrentPageNumUpdated(): void { | 14 | onCurrentPageNumUpdated(): void { |
| 15 | - console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) | 15 | + console.log('ENewspaperListDialog',"ENewspaperPageDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | aboutToAppear(): void { | 18 | aboutToAppear(): void { |
| @@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
| 16 | "wdConstant": "file:../../commons/wdConstant", | 16 | "wdConstant": "file:../../commons/wdConstant", |
| 17 | "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", | 17 | "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", |
| 18 | "wdRouter": "file:../../commons/wdRouter", | 18 | "wdRouter": "file:../../commons/wdRouter", |
| 19 | - "wdTracking": "file:../../features/wdTracking" | 19 | + "wdTracking": "file:../../features/wdTracking", |
| 20 | + "wdShare": "file:../../features/wdShare" | ||
| 20 | } | 21 | } |
| 21 | } | 22 | } |
| @@ -6,6 +6,7 @@ import { DateFormatUtil, PlayerConstants, WDAliPlayerController } from 'wdPlayer | @@ -6,6 +6,7 @@ import { DateFormatUtil, PlayerConstants, WDAliPlayerController } from 'wdPlayer | ||
| 6 | import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'; | 6 | import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'; |
| 7 | import { DisplayDirection } from 'wdConstant/Index'; | 7 | import { DisplayDirection } from 'wdConstant/Index'; |
| 8 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index'; | 8 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index'; |
| 9 | +import { WDShare } from 'wdShare/Index'; | ||
| 9 | //直播间播放器上层覆盖物 | 10 | //直播间播放器上层覆盖物 |
| 10 | @Component | 11 | @Component |
| 11 | export struct PlayUIComponent { | 12 | export struct PlayUIComponent { |
| @@ -123,6 +124,9 @@ export struct PlayUIComponent { | @@ -123,6 +124,9 @@ export struct PlayUIComponent { | ||
| 123 | .width(24) | 124 | .width(24) |
| 124 | .aspectRatio(1) | 125 | .aspectRatio(1) |
| 125 | .visibility(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? Visibility.Visible : Visibility.None) | 126 | .visibility(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? Visibility.Visible : Visibility.None) |
| 127 | + .onClick(() => { | ||
| 128 | + WDShare.shareContent(this.contentDetailData) | ||
| 129 | + }) | ||
| 126 | } | 130 | } |
| 127 | .width('100%') | 131 | .width('100%') |
| 128 | .alignItems(VerticalAlign.Center) | 132 | .alignItems(VerticalAlign.Center) |
| @@ -379,10 +383,11 @@ export struct PlayUIComponent { | @@ -379,10 +383,11 @@ export struct PlayUIComponent { | ||
| 379 | step: 1, | 383 | step: 1, |
| 380 | style: SliderStyle.OutSet | 384 | style: SliderStyle.OutSet |
| 381 | }) | 385 | }) |
| 382 | - .blockSize({ | ||
| 383 | - width: 18, | ||
| 384 | - height: 12 | ||
| 385 | - })// .blockStyle({ | 386 | + // .blockSize({ |
| 387 | + // width: 18, | ||
| 388 | + // height: 12 | ||
| 389 | + // }) | ||
| 390 | + // .blockStyle({ | ||
| 386 | // type: SliderBlockType.IMAGE, | 391 | // type: SliderBlockType.IMAGE, |
| 387 | // image: $r('app.media.ic_player_block') | 392 | // image: $r('app.media.ic_player_block') |
| 388 | // }) | 393 | // }) |
| @@ -390,8 +395,14 @@ export struct PlayUIComponent { | @@ -390,8 +395,14 @@ export struct PlayUIComponent { | ||
| 390 | .trackColor('#4DFFFFFF') | 395 | .trackColor('#4DFFFFFF') |
| 391 | .selectedColor('#FFED2800') | 396 | .selectedColor('#FFED2800') |
| 392 | .height(14) | 397 | .height(14) |
| 393 | - .trackThickness(1) | 398 | + .trackThickness(2) |
| 399 | + .blockStyle({ | ||
| 400 | + type: SliderBlockType.IMAGE, | ||
| 401 | + image: $r('app.media.ic_player_block') | ||
| 402 | + }) | ||
| 403 | + .blockSize({ width: 18, height: 12 }) | ||
| 394 | .layoutWeight(1) | 404 | .layoutWeight(1) |
| 405 | + .height(14) | ||
| 395 | .margin({ | 406 | .margin({ |
| 396 | left: 8, | 407 | left: 8, |
| 397 | right: 8 | 408 | right: 8 |
| @@ -5,6 +5,7 @@ import { NumberFormatterUtils, WindowModel } from 'wdKit/Index' | @@ -5,6 +5,7 @@ import { NumberFormatterUtils, WindowModel } from 'wdKit/Index' | ||
| 5 | import { window } from '@kit.ArkUI' | 5 | import { window } from '@kit.ArkUI' |
| 6 | import { WDAliPlayerController } from 'wdPlayer/Index' | 6 | import { WDAliPlayerController } from 'wdPlayer/Index' |
| 7 | import { DisplayDirection } from 'wdConstant/Index' | 7 | import { DisplayDirection } from 'wdConstant/Index' |
| 8 | +import { WDShare } from 'wdShare/Index' | ||
| 8 | 9 | ||
| 9 | /** | 10 | /** |
| 10 | * 沉浸式直播--- 头部标题 | 11 | * 沉浸式直播--- 头部标题 |
| @@ -76,6 +77,9 @@ export struct PlayerTitleComponent { | @@ -76,6 +77,9 @@ export struct PlayerTitleComponent { | ||
| 76 | .aspectRatio(1) | 77 | .aspectRatio(1) |
| 77 | .visibility((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ? Visibility.Visible : Visibility.None) | 78 | .visibility((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ? Visibility.Visible : Visibility.None) |
| 78 | .margin({right:16}) | 79 | .margin({right:16}) |
| 80 | + .onClick(() => { | ||
| 81 | + WDShare.shareContent(this.contentDetailData) | ||
| 82 | + }) | ||
| 79 | }.margin({ bottom: 10 }) | 83 | }.margin({ bottom: 10 }) |
| 80 | 84 | ||
| 81 | Row() { | 85 | Row() { |
| @@ -123,10 +123,10 @@ export struct PlayerVideoControlComponent { | @@ -123,10 +123,10 @@ export struct PlayerVideoControlComponent { | ||
| 123 | step: 1, | 123 | step: 1, |
| 124 | style: SliderStyle.OutSet | 124 | style: SliderStyle.OutSet |
| 125 | }) | 125 | }) |
| 126 | - .blockSize({ | ||
| 127 | - width: 18, | ||
| 128 | - height: 12 | ||
| 129 | - }) | 126 | + // .blockSize({ |
| 127 | + // width: 18, | ||
| 128 | + // height: 12 | ||
| 129 | + // }) | ||
| 130 | .trackColor('#4DFFFFFF') | 130 | .trackColor('#4DFFFFFF') |
| 131 | .selectedColor('#FFED2800') | 131 | .selectedColor('#FFED2800') |
| 132 | .trackThickness(2) | 132 | .trackThickness(2) |
-
Please register or login to post a comment