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-05-07 10:36:15 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6ea1d5560f328055e61afe0be1f2f3e233af12de
6ea1d556
1 parent
db703f10
fix(图集):沉浸式/加v
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
28 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MultiPictureDetailPageComponent.ets
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/MultiPictureDetailPageComponent.ets
View file @
6ea1d55
import { NetworkUtil, Logger, NetworkType, SPHelper, WindowModel} from 'wdKit';
import { NetworkUtil, Logger, NetworkType, SPHelper, WindowModel
, StringUtils
} from 'wdKit';
import { ResponseDTO } from 'wdNetwork';
import {
ContentDetailDTO,
...
...
@@ -102,25 +102,41 @@ export struct MultiPictureDetailPageComponent {
Row({ space: 8 }) {
if (this.getImgUrl()){
Row() {
Image(this.getImgUrl())
.borderRadius(24)
.aspectRatio(1)
.border({ width: 1, color: Color.White, style: BorderStyle.Solid })
.width(36)
.height(36)
.objectFit(ImageFit.Fill)
.interpolation(ImageInterpolation.High)
.onClick(() => {
if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
// 号主页
const params: Params = {
creatorId: this.contentDetailData.rmhInfo.rmhId,
pageID: ''
}
WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
Stack() {
Image(this.getImgUrl())
.borderRadius(24)
.aspectRatio(1)
.border({ width: 1, color: Color.White, style: BorderStyle.Solid })
.width(36)
.height(36)
.objectFit(ImageFit.Fill)
.interpolation(ImageInterpolation.High)
if(!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)){
Stack() {
Image(this.contentDetailData.rmhInfo?.authIcon)
.width($r('app.float.vp_13'))
.height($r('app.float.vp_13'))
.objectFit(ImageFit.Cover)
}
.width(36)
.height(36)
.alignContent(Alignment.BottomEnd)
}
}
.width(36)
.height(36)
.alignContent(Alignment.Center)
.onClick(() => {
if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
// 号主页
const params: Params = {
creatorId: this.contentDetailData.rmhInfo.rmhId,
pageID: ''
}
WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
}
})
})
}
.width('13%')
.height('100%')
...
...
@@ -380,11 +396,11 @@ export struct MultiPictureDetailPageComponent {
}
this.netStatus = undefined
this.contentDetailData = resDTO.data?.[0];
if (this.contentDetailData.rmhPlatform == 1) {
WindowModel.shared.setWindowSystemBarProperties({
statusBarContentColor: '#ffffff',
})
}
// if (this.contentDetailData.rmhPlatform == 1) {
// WindowModel.shared.setWindowSystemBarProperties({
// statusBarContentColor: '#ffffff',
// })
// }
if (this.contentDetailData?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId)
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
View file @
6ea1d55
...
...
@@ -2,7 +2,7 @@ import { Logger } from 'wdKit';
import { MultiPictureDetailPageComponent } from 'wdComponent';
import router from '@ohos.router';
import { Params, Action } from 'wdBean';
import { WindowModel } from 'wdKit/Index';
const TAG = 'MultiPictureDetailPage';
/**
...
...
@@ -26,6 +26,8 @@ struct MultiPictureDetailPage {
})
}
}
.padding({top:44})
.backgroundColor(Color.Black)
}
pageTransition(){
...
...
@@ -38,6 +40,10 @@ struct MultiPictureDetailPage {
}
aboutToAppear() {
this.openFullScreen()
Logger.info(TAG, 'aboutToDisappear');
let par:Action = router.getParams() as Action;
let params = par?.params;
this.relId = params?.extra?.relId || '';
...
...
@@ -47,11 +53,33 @@ struct MultiPictureDetailPage {
Logger.info(TAG, 'params', JSON.stringify(params));
}
aboutToDisappear() {
Logger.info(TAG, 'aboutToDisappear');
}
onBackPress() {
Logger.info(TAG, 'onBackPress');
}
/**
* 开启沉浸式
* TODO:颜色待根据业务接口修改
*/
openFullScreen() {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
WindowModel.shared.setWindowLayoutFullScreen(true)
// WindowModel.shared.setWindowSystemBarEnable([])
}
aboutToDisappear(): void {
console.log(TAG, 'aboutToDisappear')
this.closeFullScreen()
}
/**
* 关闭沉浸式
* TODO:颜色待根据业务接口修改
*/
closeFullScreen() {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
WindowModel.shared.setWindowLayoutFullScreen(false)
// WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment