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
王士厅
2024-06-04 17:55:53 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
941d336deb066719281ddc2f9d3a10024672801a
941d336d
2 parents
8996f278
21fda2ef
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
28 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
941d336
...
...
@@ -93,7 +93,8 @@ export struct CardMediaInfo {
.fontFamily('BebasNeue')
}
} .margin({ left: 68,top: 135})
}
// .margin({ left: 68,top: 135})
} else if (this.contentDTO.objectType === '2') {
// liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
// 显示直播信息
...
...
@@ -191,7 +192,7 @@ export struct CardMediaInfo {
.mediaTextImgtype()
.fontFamily('BebasNeue')
}
.margin({ left: 80,top: 55})
//
.margin({ left: 80,top: 55})
} else if (this.contentDTO.objectType === '13') {
// 显示音频信息
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
941d336
...
...
@@ -4,7 +4,7 @@ import router from '@ohos.router';
import { DetailPlayLivePage } from './DetailPlayLivePage';
import { DetailPlayVLivePage } from './DetailPlayVLivePage';
import { DateTimeUtils, Logger, ToastUtils } from 'wdKit/Index';
import { DateTimeUtils, Logger, ToastUtils
, WindowModel
} from 'wdKit/Index';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { PictureLoading } from '../widgets/vertical/PictureLoading';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
...
...
@@ -26,6 +26,8 @@ export struct DetailPlayLiveCommon {
private liveViewModel: LiveViewModel = new LiveViewModel()
pageShowTime: number = 0;
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide relId: string = ''
@Provide contentId: string = ''
@Provide relType: string = ''
...
...
@@ -83,7 +85,7 @@ export struct DetailPlayLiveCommon {
.height('100%')
.width('100%')
.backgroundColor(Color.Black)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
//
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
/**
...
...
@@ -153,9 +155,11 @@ export struct DetailPlayLiveCommon {
this.pageShow = Math.random()
Logger.info(TAG, 'onPageShow')
this.pageShowTime = DateTimeUtils.getTimeStamp()
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
}
onPageHide() {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000'})
this.pageHide = Math.random()
Logger.info(TAG, 'onPageHide')
//页面浏览
...
...
@@ -166,6 +170,7 @@ export struct DetailPlayLiveCommon {
}
onBackPress(): boolean | void {
this.pageBackPress = Math.random()
Logger.info(TAG, 'onBackPress')
return true
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
941d336
...
...
@@ -39,6 +39,8 @@ export struct DetailPlayLivePage {
// 尽量不要动属性。用来作为输入了评论之后,值传递
@State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息
@State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息
// 顶部状态栏高度
@Consume topSafeHeight: number
aboutToAppear(): void {
Logger.info(TAG, `wyj-aboutToAppear`)
...
...
@@ -50,7 +52,7 @@ export struct DetailPlayLivePage {
} else {
this.displayDirection = DisplayDirection.VERTICAL
}
WindowModel.shared.setMainWindowFullScreen(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
//
WindowModel.shared.setMainWindowFullScreen(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
})
this.getLiveDetails()
this.getLiveRoomData()
...
...
@@ -66,9 +68,11 @@ export struct DetailPlayLivePage {
build() {
Column() {
TopPlayComponent({ playerController: this.playerController })
.height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%')
.margin({
top: this.displayDirection == DisplayDirection.VERTICAL ? px2vp(this.topSafeHeight) : 0
})
TabComponent({
tabs: this.tabs,
...
...
@@ -114,7 +118,6 @@ export struct DetailPlayLivePage {
.height('100%')
.width('100%')
// 设置底部绘制延伸到导航条
}
onPageShowCus(): void {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
View file @
941d336
...
...
@@ -23,8 +23,8 @@ export struct DetailPlayVLivePage {
private playerController: WDAliPlayerController = new WDAliPlayerController();
private swiperController: SwiperController = new SwiperController()
@Consume contentDetailData: ContentDetailDTO
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@Consume bottomSafeHeight: number
@Consume topSafeHeight: number
@Provide liveRoomDataBean: LiveRoomDataBean = {} as LiveRoomDataBean
@Provide isShowControl: boolean = false
@Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL //横竖屏,默认竖屏
...
...
@@ -53,14 +53,16 @@ export struct DetailPlayVLivePage {
openFullScreen() {
console.log(TAG, 'openFullScreen')
WindowModel.shared.setWindowLayoutFullScreen(true)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
// WindowModel.shared.setWindowLayoutFullScreen(true)
// WindowModel.shared.setSpecificSystemBarEnabled()
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
}
closeFullScreen() {
console.log(TAG, 'closeFullScreen')
WindowModel.shared.setWindowLayoutFullScreen(false)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
// WindowModel.shared.setWindowLayoutFullScreen(false)
// WindowModel.shared.setSpecificSystemBarEnabled(true)
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
}
build() {
...
...
@@ -72,7 +74,6 @@ export struct DetailPlayVLivePage {
.width('100%')
.blur(100)
.renderFit(RenderFit.RESIZE_COVER)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
// 直播结束且无回看
if (this.liveState === 'end' && !this.playUrl) {
PlayerEndView()
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
941d336
...
...
@@ -101,9 +101,8 @@ export struct PlayUIComponent {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
// devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
// window.Orientation.PORTRAIT :
// window.Orientation.LANDSCAPE);
WindowModel.shared.setSpecificSystemBarEnabled(true)
})
if (this.contentDetailData.liveInfo?.liveState != 'wait') {
Text(this.contentDetailData.newsTitle)
...
...
@@ -310,12 +309,14 @@ export struct PlayUIComponent {
this.displayDirection =
this.displayDirection == DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL :
DisplayDirection.VERTICAL
WindowModel.shared.setSpecificSystemBarEnabled(false)
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
// devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
// window.Orientation.PORTRAIT :
// window.Orientation.LANDSCAPE);
})
.visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
View file @
941d336
...
...
@@ -178,7 +178,6 @@ export struct TopPlayComponent {
if (this.liveDetailPageLogic.showPad) {
} else {
// 视频资源播放
WDPlayerRenderLiveView({
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
View file @
941d336
...
...
@@ -128,7 +128,7 @@ export struct PlayerCommentComponent {
}
},
onBack: () => {
WindowModel.shared.setWindowLayoutFullScreen(false)
//
WindowModel.shared.setWindowLayoutFullScreen(false)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
}
})
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
View file @
941d336
...
...
@@ -5,7 +5,7 @@ import { SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import { ButtonOptions, promptAction, window } from '@kit.ArkUI';
import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
import { ImageKnifeComponent } from '@ohos/imageknife';
import { ImageKnifeComponent
,ScaleType
} from '@ohos/imageknife';
@Entry
@Component
...
...
@@ -13,6 +13,8 @@ struct LaunchInterestsHobbiesPage {
@State message: string = 'Hello World'
@State selectCount: number = 0
@State interestsArray: InterestsList[] = []
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
aboutToAppear(){
//请求接口,获取兴趣偏好数据
...
...
@@ -39,6 +41,7 @@ struct LaunchInterestsHobbiesPage {
this.trackingLaunchJumpOver(false)
})
}
.margin({top:px2vp(this.topSafeHeight)})
.width('100%')
.justifyContent(FlexAlign.End)
...
...
@@ -62,7 +65,7 @@ struct LaunchInterestsHobbiesPage {
ForEach(this.interestsArray,(item:InterestsList,index:number)=>{
GridItem(){
Stack({alignContent:Alignment.TopStart}){
ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic}})
ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic
,mainScaleType:ScaleType.FIT_XY
}})
.width('100%')
.height('100%')
.backgroundColor(Color.White)
...
...
@@ -98,7 +101,7 @@ struct LaunchInterestsHobbiesPage {
Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot'))
.height('32lpx')
.width('32lpx')
.margin({top:'80lpx',left:'1
1
0lpx'})
.margin({top:'80lpx',left:'1
2
0lpx'})
}.justifyContent(FlexAlign.Start)
}
...
...
@@ -118,8 +121,7 @@ struct LaunchInterestsHobbiesPage {
})
}
.width('90%')
// .height('70%')
.margin({top:'61lpx',bottom:'240lpx'})
.margin({top:'61lpx',bottom:'300lpx'})
.columnsTemplate('1fr 1fr 1fr')
.columnsGap('23lpx')
.rowsGap('23lpx')
...
...
@@ -129,7 +131,7 @@ struct LaunchInterestsHobbiesPage {
.height('100%')
}
.width('100%')
.height(`calc(100% - ${1
0
8 + 'lpx'})`)
.height(`calc(100% - ${1
5
8 + 'lpx'})`)
// .backgroundColor(Color.Red)
Stack({alignContent:Alignment.Center}){
...
...
Please
register
or
login
to post a comment