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
wangliang_wd
2024-10-31 16:43:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c9d394f7f1e1dfc74b1f4bd87e76cffe342c41dd
c9d394f7
1 parent
ea65e939
feat:优化直播详情页转屏
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
8 deletions
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
c9d394f
...
...
@@ -276,7 +276,8 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
commentId: content?.commentInfo?.commentId,
rmhPlatform:content?.rmhPlatform
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
...
...
@@ -436,7 +437,8 @@ export class ProcessUtils {
relId: content?.relId,
channelId: content?.channelId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
commentId: content?.commentInfo?.commentId,
rmhPlatform:content?.rmhPlatform
} as ExtraDTO,
targetLayout: content.customParamTargetLayout,
} as Params,
...
...
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
View file @
c9d394f
...
...
@@ -21,4 +21,5 @@ export interface ExtraDTO extends ItemDTO {
extra
?:
string
title
:
string
showComment
?:
boolean
rmhPlatform
?:
number
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
c9d394f
...
...
@@ -99,6 +99,7 @@ export struct DynamicDetailComponent {
pageParam: ParamType = {}
commentListAreaInfo?: Area
lastTimeoutId?: number
@State pageRmhPlatform: number = 0;
// @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
...
...
@@ -107,6 +108,7 @@ export struct DynamicDetailComponent {
// 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
this.likesStyle = this.contentDetailData.likesStyle
this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
this.pageRmhPlatform = this.action.params?.extra?.rmhPlatform || 2;
//注册通知,来自别的组件的评论成功通知
EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, (targetId?: string) => {
...
...
@@ -698,7 +700,7 @@ export struct DynamicDetailComponent {
@Builder topNav() {
//logo、日期
Row() {
if (this.
contentDetailData.r
mhPlatform == 1) { // 人民号
if (this.
pageR
mhPlatform == 1) { // 人民号
if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
Blank().height(1)
} else {
...
...
@@ -707,7 +709,7 @@ export struct DynamicDetailComponent {
.height($r('app.float.margin_28'))
.margin({ left: $r('app.float.margin_16') })
}
} else if (this.
contentDetailData.r
mhPlatform == 2) { // 普通用户
} else if (this.
pageR
mhPlatform == 2) { // 普通用户
Blank().height(1)
} else {
Image($r('app.media.logo_rmrb'))
...
...
@@ -797,6 +799,7 @@ export struct DynamicDetailComponent {
let data = await MultiPictureDetailViewModel.getDetailData(relId, contentId, relType)
this.isPageEnd = true;
this.contentDetailData = data[0];
this.pageRmhPlatform = this.contentDetailData.rmhPlatform
let dateTime =
DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
c9d394f
...
...
@@ -76,6 +76,7 @@ export struct ImageAndTextPageComponent {
pageHideTime:number = 0;
lastTimeoutId?: number
@State needAnimation: boolean = false;
@State pageRmhPlatform: number = 0;
@State @Watch("webPageIsPageEnd") isPageEnd: boolean = false
@Consume @Watch('pageShowForUpdateData') pageShow :number
...
...
@@ -273,13 +274,13 @@ export struct ImageAndTextPageComponent {
Column() {
Row() {
if (this.isNetConnected && !this.detailContentEmpty) {
if (this.
contentDetailData.r
mhPlatform == 1) { // 人民号
if (this.
pageR
mhPlatform == 1) { // 人民号
if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
Blank().height(1)
} else {
Image($r('app.media.logo_rmh')).width(80) .height(28)
}
} else if (this.
contentDetailData.r
mhPlatform == 2) { // 普通用户
} else if (this.
pageR
mhPlatform == 2) { // 普通用户
Blank().height(1)
} else {
Image($r('app.media.logo_rmrb')).width(80) .height(28)
...
...
@@ -352,6 +353,8 @@ export struct ImageAndTextPageComponent {
}
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans[0];
this.pageRmhPlatform = this.contentDetailData.rmhPlatform
let dateTime =
DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
...
...
@@ -518,6 +521,7 @@ export struct ImageAndTextPageComponent {
aboutToAppear() {
// Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据');
this.pageRmhPlatform = this.action.params?.extra?.rmhPlatform || 2;
this.getDetail()
this.screenHeight = DisplayUtils.getDeviceHeight()
this.initAnimationConfig();
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
c9d394f
...
...
@@ -461,11 +461,16 @@ export struct PlayUIComponent {
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE).then(()=>{
WindowModel.shared.setSpecificSystemBarEnabled(true)
EmitterUtils.sendEvent(EmitterEventId.live_FULL_SCREEN, 0)
})
let timer = setTimeout(() => {
EmitterUtils.sendEvent(EmitterEventId.live_
half
_SCREEN, 0)
EmitterUtils.sendEvent(EmitterEventId.live_
FULL
_SCREEN, 0)
clearTimeout(timer)
}, 100)
let timer1 = setTimeout(() => {
EmitterUtils.sendEvent(EmitterEventId.live_half_SCREEN, 0)
clearTimeout(timer1)
}, 200)
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment