zhenghy

标题弹框渐变背景,直播评论返回回调

@@ -43,6 +43,8 @@ const TAG = 'OperRowListView'; @@ -43,6 +43,8 @@ const TAG = 'OperRowListView';
43 @Preview 43 @Preview
44 @Component 44 @Component
45 export struct OperRowListView { 45 export struct OperRowListView {
  46 + private onBack: () => void = () => {
  47 + }
46 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情 48 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情
47 @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件 49 @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件
48 @ObjectLink publishCommentModel: publishCommentModel 50 @ObjectLink publishCommentModel: publishCommentModel
@@ -102,6 +104,9 @@ export struct OperRowListView { @@ -102,6 +104,9 @@ export struct OperRowListView {
102 } 104 }
103 .hoverEffect(HoverEffect.Scale) 105 .hoverEffect(HoverEffect.Scale)
104 .onClick(() => { 106 .onClick(() => {
  107 + if (this.onBack) {
  108 + this.onBack()
  109 + }
105 router.back(); 110 router.back();
106 }) 111 })
107 .width(42) 112 .width(42)
@@ -34,7 +34,7 @@ export struct DetailPlayVLivePage { @@ -34,7 +34,7 @@ export struct DetailPlayVLivePage {
34 34
35 aboutToAppear(): void { 35 aboutToAppear(): void {
36 console.log(TAG, 'aboutToAppear') 36 console.log(TAG, 'aboutToAppear')
37 - // WindowModel.shared.setWindowLayoutFullScreen(true) 37 + WindowModel.shared.setWindowLayoutFullScreen(true)
38 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 38 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
39 39
40 //https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/content/zh/c/content/detail?relId=500005302448&relType=1&contentId=20000016340 40 //https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/content/zh/c/content/detail?relId=500005302448&relType=1&contentId=20000016340
@@ -48,7 +48,7 @@ export struct DetailPlayVLivePage { @@ -48,7 +48,7 @@ export struct DetailPlayVLivePage {
48 } 48 }
49 49
50 aboutToDisappear(): void { 50 aboutToDisappear(): void {
51 - // WindowModel.shared.setWindowLayoutFullScreen(false) 51 + WindowModel.shared.setWindowLayoutFullScreen(false)
52 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 52 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
53 } 53 }
54 54
@@ -86,7 +86,6 @@ export struct DetailPlayVLivePage { @@ -86,7 +86,6 @@ export struct DetailPlayVLivePage {
86 .width(40) 86 .width(40)
87 .aspectRatio(1) 87 .aspectRatio(1)
88 .visibility(this.swiperIndex === 0 ? Visibility.Visible : Visibility.Hidden) 88 .visibility(this.swiperIndex === 0 ? Visibility.Visible : Visibility.Hidden)
89 - .animation({ duration: 500 })  
90 .position({ x: '100%', y: '100%' }) 89 .position({ x: '100%', y: '100%' })
91 .markAnchor({ x: 56, y: 56 }) 90 .markAnchor({ x: 56, y: 56 })
92 .onClick(() => { 91 .onClick(() => {
@@ -10,6 +10,7 @@ import { LiveViewModel } from '../../viewModel/LiveViewModel' @@ -10,6 +10,7 @@ import { LiveViewModel } from '../../viewModel/LiveViewModel'
10 import { ChartItemCompereComponent } from './ChartItemCompereComponent' 10 import { ChartItemCompereComponent } from './ChartItemCompereComponent'
11 import { ChatItemComponent } from './ChartItemComponent' 11 import { ChatItemComponent } from './ChartItemComponent'
12 import { router } from '@kit.ArkUI' 12 import { router } from '@kit.ArkUI'
  13 +import { WindowModel } from 'wdKit/Index'
13 14
14 const TAG = "PlayerCommentComponent" 15 const TAG = "PlayerCommentComponent"
15 16
@@ -128,6 +129,10 @@ export struct PlayerCommentComponent { @@ -128,6 +129,10 @@ export struct PlayerCommentComponent {
128 operationButtonList: ['comment', 'collect', 'share', 'like'], 129 operationButtonList: ['comment', 'collect', 'share', 'like'],
129 contentDetailData: this.contentDetailData, 130 contentDetailData: this.contentDetailData,
130 publishCommentModel: this.publishCommentModel, 131 publishCommentModel: this.publishCommentModel,
  132 + onBack: () => {
  133 + WindowModel.shared.setWindowLayoutFullScreen(false)
  134 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
  135 + }
131 }) 136 })
132 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 137 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
133 138
@@ -38,8 +38,7 @@ export struct PlayerComponent { @@ -38,8 +38,7 @@ export struct PlayerComponent {
38 } 38 }
39 39
40 aboutToDisappear(): void { 40 aboutToDisappear(): void {
41 - this.playerController.onCanplay = () => {  
42 - } 41 +
43 this.playerController?.pause() 42 this.playerController?.pause()
44 this.playerController?.stop() 43 this.playerController?.stop()
45 this.playerController?.release() 44 this.playerController?.release()
@@ -29,7 +29,7 @@ export struct VideoChannelDetail { @@ -29,7 +29,7 @@ export struct VideoChannelDetail {
29 private groupId: string = '' // 楼层id 29 private groupId: string = '' // 楼层id
30 private pageId: string = '' //页面id 30 private pageId: string = '' //页面id
31 private pageNum: number = 1 31 private pageNum: number = 1
32 - private pageSize: number = 10 32 + private pageSize: number = 5
33 private loadStrategy: string = 'first_load' // 首次加载: first_load, 上推刷新: push_up, 下拉刷新: pull_down 33 private loadStrategy: string = 'first_load' // 首次加载: first_load, 上推刷新: push_up, 下拉刷新: pull_down
34 private refreshTime: number = new Date().getTime() // 第一页刷新时间,用于频道分页排序时过滤,查询时携带【首刷、下拉取当前最新时间;其他的都使用首刷的时间】 34 private refreshTime: number = new Date().getTime() // 第一页刷新时间,用于频道分页排序时过滤,查询时携带【首刷、下拉取当前最新时间;其他的都使用首刷的时间】
35 private channelId: string = '' // 频道id 35 private channelId: string = '' // 频道id
@@ -56,11 +56,11 @@ export struct DetailDialog { @@ -56,11 +56,11 @@ export struct DetailDialog {
56 .width('100%') 56 .width('100%')
57 .alignItems(HorizontalAlign.Start) 57 .alignItems(HorizontalAlign.Start)
58 // .backgroundColor('#80000000') 58 // .backgroundColor('#80000000')
59 - // .linearGradient({  
60 - // direction: GradientDirection.Top, // 渐变方向  
61 - // repeating: false, // 渐变颜色是否重复  
62 - // colors: [['rgba(0, 0, 0, 0.1)', 0.0], ['rgba(0, 0, 0, 0)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果  
63 - // }) 59 + .linearGradient({
  60 + direction: GradientDirection.Bottom, // 渐变方向
  61 + colors: [['rgba(0,0,0,0)', 0.1], ['#000000', 0.66],
  62 + ['#000000', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果
  63 + })
64 .padding({ 64 .padding({
65 top: 20, 65 top: 20,
66 bottom: 30, 66 bottom: 30,