zhenghy

图集添加评论弹窗

... ... @@ -24,6 +24,7 @@ import { SpConstants } from 'wdConstant/Index';
import { router } from '@kit.ArkUI';
import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { CommentDialogView } from 'wdDetailPlayShortVideo/Index';
const TAG = 'MultiPictureDetailPageComponent';
... ... @@ -37,20 +38,24 @@ export struct MultiPictureDetailPageComponent {
private picWidth: number = 0
@State picHeight: number = 0
@State titleHeight: number = 0
@State index: number = 0
@State currentIndex: number = 0
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
@Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0
@Provide windowHeight: number = AppStorage.get<number>('windowHeight') || 0
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01'
private swiperController: SwiperController = new SwiperController()
private swiperControllerItem: SwiperController = new SwiperController()
@State swiperIndex: number = 0;
@Provide followStatus: string | undefined = undefined // 关注状态
@Provide showCommentList: boolean = false
private scroller: Scroller = new Scroller()
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
@State showDownload: Boolean = false // 控制是否显示下载默认隐藏
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State operationButtonList: string[] = ['comment', 'like', 'collect', 'share']
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') as number;
@State windowHeight: number = AppStorage.get<number>('windowHeight') as number;
@State currentOffset: number = 0
@State duration: number = 0
... ... @@ -92,6 +97,13 @@ export struct MultiPictureDetailPageComponent {
build() {
RelativeContainer() {
this.init()
CommentDialogView({
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
publishCommentModel: $publishCommentModel
})
}
.width('100%')
.height('100%')
... ... @@ -369,8 +381,12 @@ export struct MultiPictureDetailPageComponent {
operationButtonList: this.operationButtonList,
styleType: 2,
componentType: 5,
pageComponentType: 3
pageComponentType: 3,
onCommentIconClick: () => {
this.showCommentList = true
}
})
}
.transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine(
TransitionEffect.translate({ x: 0, y: `-${this.bottomSafeHeight}px` })
... ... @@ -551,8 +567,8 @@ export struct MultiPictureDetailPageComponent {
/**
* 意图上报
*/
private viewBlogInsightIntentShare(){
private viewBlogInsightIntentShare() {
let context = getContext(this) as common.UIAbilityContext;
viewBlogItemInsightIntentShare(context,this.contentDetailData)
viewBlogItemInsightIntentShare(context, this.contentDetailData)
}
}
\ No newline at end of file
... ...
... ... @@ -180,6 +180,7 @@ export struct DetailPlayShortVideoPage {
CommentDialogView({
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
publishCommentModel: $publishCommentModel
})
this.playerViewBuilder()
... ...
... ... @@ -10,7 +10,7 @@ import { OperRowListView } from '../../../../../wdComponent/src/main/ets/compone
@Component
export struct CommentDialogView {
@Link publishCommentModel: publishCommentModel
@Consume @Watch('showCommentListChange') showCommentList: boolean
@Link @Watch('showCommentListChange') showCommentList: boolean
@Link index: number
@Link currentIndex: number
@Consume windowWidth: number
... ...