Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yuzhilin
2024-05-20 09:24:00 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
910a812999ddeb2a179a8b7e26e2ec6a2f0f7b27
910a8129
2 parents
75833cd8
64ba4dc0
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
29 deletions
sight_harmony/features/wdDetailPlayShortVideo/Index.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
sight_harmony/features/wdDetailPlayShortVideo/Index.ets
View file @
910a812
...
...
@@ -5,3 +5,5 @@ export { DetailVideoListPage } from './src/main/ets/pages/DetailVideoListPage'
export { VideoChannelDetail } from './src/main/ets/pages/VideoChannelDetail'
export { LottieViewDemo } from './src/main/ets/pages/LottieViewDemo'
export { CommentDialogView } from './src/main/ets/view/CommentDialogView'
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
910a812
...
...
@@ -15,8 +15,8 @@ import { HttpUtils } from 'wdNetwork/Index';
import { DateTimeUtils, WindowModel } from 'wdKit/Index';
import { PlayerBottomView } from '../view/PlayerBottomView';
import { PlayerRightView } from '../view/PlayerRightView';
import { CommentDialogView } from '../view/CommentDialogView';
import { DisplayDirection } from 'wdConstant/Index';
import { CommentDialogView } from '../view/CommentDialogView';
const TAG = 'DetailPlayShortVideoPage';
...
...
@@ -28,6 +28,7 @@ const TAG = 'DetailPlayShortVideoPage';
export struct DetailPlayShortVideoPage {
@Prop index: number = 0
@Prop @Watch('currentIndexChange') currentIndex: number = 0
@Provide publishCommentModel: publishCommentModel = new publishCommentModel()
@State playerController: WDPlayerController = new WDPlayerController();
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
@Provide interactData: InteractDataDTO = {} as InteractDataDTO
...
...
@@ -47,7 +48,6 @@ export struct DetailPlayShortVideoPage {
@Consume topSafeHeight: number
@Consume showComment: boolean // 是否显示底部评论,首页视频频道传false
@State imageVisible: boolean = true
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State ratio: number = 16 / 9
/**
...
...
@@ -164,15 +164,6 @@ export struct DetailPlayShortVideoPage {
}
this.queryNewsInfoOfUser()
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.publishCommentModel.commentContent = ''
}
...
...
@@ -186,7 +177,11 @@ export struct DetailPlayShortVideoPage {
Stack({ alignContent: Alignment.Top }) {
Column() {
Stack() {
CommentDialogView({
index: $index,
currentIndex: $currentIndex,
publishCommentModel: $publishCommentModel
})
this.playerViewBuilder()
PlayerBottomView({
...
...
@@ -224,7 +219,6 @@ export struct DetailPlayShortVideoPage {
.height('100%')
.width('100%')
CommentDialogView({ publishCommentModel: this.publishCommentModel })
}
.height('100%')
.width('100%')
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
View file @
910a812
...
...
@@ -9,19 +9,25 @@ import { OperRowListView } from '../../../../../wdComponent/src/main/ets/compone
@Component
export struct CommentDialogView {
@Prop publishCommentModel: publishCommentModel
@Link publishCommentModel: publishCommentModel
@Consume @Watch('showCommentListChange') showCommentList: boolean
@Link index: number
@Link currentIndex: number
@Consume windowWidth: number
@Consume windowHeight: number
@Consume bottomSafeHeight: number
@Consume topSafeHeight: number
@Consume contentDetailData: ContentDetailDTO
@Consume @Watch('showCommentListChange') showCommentList: boolean
@State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
@State modifier: DrawModifier = new DrawModifier();
private dialogController: CustomDialogController = new CustomDialogController({
// @State modifier: DrawModifier = new DrawModifier();
dialogController: CustomDialogController = new CustomDialogController({
builder: DetailDialog({
publishCommentModel: this.publishCommentModel,
dialogOffsetY: $dialogOffsetY
publishCommentModel: $publishCommentModel,
contentDetailData: $contentDetailData,
dialogOffsetY: $dialogOffsetY,
showCommentList: $showCommentList,
windowWidth: this.windowWidth,
windowHeight: this.windowHeight
}),
autoCancel: false,
customStyle: true,
...
...
@@ -30,8 +36,8 @@ export struct CommentDialogView {
// this.showCommentList = false
// dismissDialogAction.dismiss()
// },
openAnimation: { duration: 0 },
closeAnimation: { duration: 0 },
// openAnimation: { duration: 0 },
// closeAnimation: { duration: 0 },
})
/**
...
...
@@ -39,7 +45,7 @@ export struct CommentDialogView {
*/
showCommentListChange(val: boolean) {
if (this.showCommentList) {
if (this.showCommentList
&& this.index === this.currentIndex
) {
this.dialogController.open()
console.log('open')
// animateTo({ duration: 10000, expectedFrameRateRange: { min: 60, max: 60, expected: 60 } }, () => {
...
...
@@ -59,15 +65,16 @@ export struct CommentDialogView {
@CustomDialog
export struct DetailDialog {
controller: CustomDialogController
@
Prop
publishCommentModel: publishCommentModel
@
Link
publishCommentModel: publishCommentModel
@Link dialogOffsetY: number
@Consume contentDetailData: ContentDetailDTO
@Consume showCommentList: boolean
@Consume windowWidth: number
@Consume windowHeight: number
@Link contentDetailData: ContentDetailDTO
@Link showCommentList: boolean
@Prop windowWidth: number
@Prop windowHeight: number
build() {
Column() {
Scroll() {
CommentComponent({
publishCommentModel: this.publishCommentModel,
showCloseIcon: true,
...
...
@@ -75,9 +82,15 @@ export struct DetailDialog {
console.log('onCloseClick')
this.showCommentList = false
this.controller.close()
// setTimeout(() => {
//
// }, 1000)
}
}).height('100%')
}
})
.layoutWeight(1)
OperRowListView({
componentType: 1,
showBackIcon: false,
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
View file @
910a812
...
...
@@ -69,7 +69,6 @@ export struct PlayerProgressView {
})
}
.margin({ top: 40 })
.visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
View file @
910a812
...
...
@@ -7,6 +7,9 @@ import {
postExecuteLikeParams,
postInteractAccentionOperateParams
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import {
publishCommentModel
} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
import { SPHelper, ToastUtils, NumberFormatterUtils } from 'wdKit';
import { WDPlayerController } from 'wdPlayer/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
...
...
@@ -34,6 +37,7 @@ export struct PlayerRightView {
@Consume showComment?: boolean
@Consume showCommentList: boolean
@Consume displayDirection: DisplayDirection
@Consume publishCommentModel: publishCommentModel
@State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
aboutToAppear() {
...
...
@@ -346,6 +350,16 @@ export struct PlayerRightView {
}
.margin({ bottom: 20 })
.onClick((event: ClickEvent) => {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.publishCommentModel.commentContent = ''
// ToastUtils.showToast('评论为公共方法,待开发', 1000);
this.showCommentList = true
})
...
...
Please
register
or
login
to post a comment