zhenghy

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

... ... @@ -43,6 +43,8 @@ const TAG = 'OperRowListView';
@Preview
@Component
export struct OperRowListView {
private onBack: () => void = () => {
}
@Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情
@State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件
@ObjectLink publishCommentModel: publishCommentModel
... ... @@ -102,6 +104,9 @@ export struct OperRowListView {
}
.hoverEffect(HoverEffect.Scale)
.onClick(() => {
if (this.onBack) {
this.onBack()
}
router.back();
})
.width(42)
... ...
... ... @@ -34,7 +34,7 @@ export struct DetailPlayVLivePage {
aboutToAppear(): void {
console.log(TAG, 'aboutToAppear')
// WindowModel.shared.setWindowLayoutFullScreen(true)
WindowModel.shared.setWindowLayoutFullScreen(true)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
//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 {
}
aboutToDisappear(): void {
// WindowModel.shared.setWindowLayoutFullScreen(false)
WindowModel.shared.setWindowLayoutFullScreen(false)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
}
... ... @@ -86,7 +86,6 @@ export struct DetailPlayVLivePage {
.width(40)
.aspectRatio(1)
.visibility(this.swiperIndex === 0 ? Visibility.Visible : Visibility.Hidden)
.animation({ duration: 500 })
.position({ x: '100%', y: '100%' })
.markAnchor({ x: 56, y: 56 })
.onClick(() => {
... ...
... ... @@ -10,6 +10,7 @@ import { LiveViewModel } from '../../viewModel/LiveViewModel'
import { ChartItemCompereComponent } from './ChartItemCompereComponent'
import { ChatItemComponent } from './ChartItemComponent'
import { router } from '@kit.ArkUI'
import { WindowModel } from 'wdKit/Index'
const TAG = "PlayerCommentComponent"
... ... @@ -128,6 +129,10 @@ export struct PlayerCommentComponent {
operationButtonList: ['comment', 'collect', 'share', 'like'],
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
onBack: () => {
WindowModel.shared.setWindowLayoutFullScreen(false)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
}
})
.visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
... ...
... ... @@ -38,8 +38,7 @@ export struct PlayerComponent {
}
aboutToDisappear(): void {
this.playerController.onCanplay = () => {
}
this.playerController?.pause()
this.playerController?.stop()
this.playerController?.release()
... ...
... ... @@ -29,7 +29,7 @@ export struct VideoChannelDetail {
private groupId: string = '' // 楼层id
private pageId: string = '' //页面id
private pageNum: number = 1
private pageSize: number = 10
private pageSize: number = 5
private loadStrategy: string = 'first_load' // 首次加载: first_load, 上推刷新: push_up, 下拉刷新: pull_down
private refreshTime: number = new Date().getTime() // 第一页刷新时间,用于频道分页排序时过滤,查询时携带【首刷、下拉取当前最新时间;其他的都使用首刷的时间】
private channelId: string = '' // 频道id
... ...
... ... @@ -56,11 +56,11 @@ export struct DetailDialog {
.width('100%')
.alignItems(HorizontalAlign.Start)
// .backgroundColor('#80000000')
// .linearGradient({
// direction: GradientDirection.Top, // 渐变方向
// repeating: false, // 渐变颜色是否重复
// colors: [['rgba(0, 0, 0, 0.1)', 0.0], ['rgba(0, 0, 0, 0)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果
// })
.linearGradient({
direction: GradientDirection.Bottom, // 渐变方向
colors: [['rgba(0,0,0,0)', 0.1], ['#000000', 0.66],
['#000000', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
.padding({
top: 20,
bottom: 30,
... ...