优化WebPage状态栏显示
This commit is contained in:
parent
8c151dbe9a
commit
ccd0fec720
|
|
@ -2,9 +2,8 @@ import { PhotoHelper } from '@pura/picker_utils'
|
|||
import { TitleBar } from '../../../../view/TitleBar'
|
||||
import { photoAccessHelper } from '@kit.MediaLibraryKit'
|
||||
import { BusinessError } from '@kit.BasicServicesKit'
|
||||
import { AppUtil, DisplayUtil, FileUtil } from '@pura/harmony-utils'
|
||||
import { AppUtil, DisplayUtil } from '@pura/harmony-utils'
|
||||
import { ToastUtils } from '../../../../utils/ToastUtils'
|
||||
import { fileIo } from '@kit.CoreFileKit'
|
||||
import { SaveUtils } from '../../../../utils/SaveUtils'
|
||||
import { LoadingDialog } from '../../../../dialog/LoadingDialog'
|
||||
import { DownloadDialog, DownloadStatus } from '../../../../dialog/DownloadDialog'
|
||||
|
|
@ -17,7 +16,7 @@ import { AuthViewModel } from '../../../../viewModel/AuthViewModel'
|
|||
import { VipAuthEntity } from '../../../../entity/VipAuthEntity'
|
||||
import { LoginManager } from '../../../../manager/LoginGlobalManager'
|
||||
import { RouterUrls } from '../../../../common/RouterUrls'
|
||||
import { curves, router } from '@kit.ArkUI'
|
||||
import { router } from '@kit.ArkUI'
|
||||
import { EventReportManager } from '../../../../manager/EventReportManager'
|
||||
|
||||
@Entry
|
||||
|
|
@ -31,14 +30,6 @@ struct ImageMergePage {
|
|||
@Local imageUris: Array<string> = []
|
||||
@Local isSuccess: boolean = false
|
||||
|
||||
@Local dragItem: number = -1; // 当前拖拽的项目
|
||||
@Local scaleItem: number = -1; // 当前缩放的项目
|
||||
@Local neighborItem: number = -1; // 相邻项目
|
||||
@Local neighborScale: number = -1; // 相邻项目的缩放比例
|
||||
@Local offsetX: number = 0;
|
||||
private dragRefOffset: number = 0; // 拖拽参考偏移
|
||||
private itemIntv: number = 80; // 项目间隔
|
||||
|
||||
@Monitor('viewModel.authInfo')
|
||||
onPermissionInfoChange(monitor: IMonitor) {
|
||||
const info = monitor.value()?.now as VipAuthEntity;
|
||||
|
|
@ -164,22 +155,6 @@ struct ImageMergePage {
|
|||
})
|
||||
}
|
||||
|
||||
scaleSelect(item: number): number {
|
||||
if (this.scaleItem === item) {
|
||||
return 1.05;
|
||||
} else if (this.neighborItem === item) {
|
||||
return this.neighborScale;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
itemMove(index: number, newIndex: number): void {
|
||||
let tmp = this.imageUris.splice(index, 1);
|
||||
this.imageUris.splice(newIndex, 0, tmp[0]);
|
||||
}
|
||||
|
||||
|
||||
showDownloadDialog() {
|
||||
DownloadDialog.show(this.getUIContext(), { status: DownloadStatus.COMPLETED, totalSize: 0, progress: 0, totalCount: 1, index: 0, callback: {
|
||||
confirm: () => {
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ struct VipPage {
|
|||
.getRouter()
|
||||
.pushUrl({
|
||||
url: RouterUrls.WEB_PAGE,
|
||||
params: { title: '会员服务协议规则', url: Constants.USER_AGREEMENT }
|
||||
params: { title: '会员服务协议规则', url: Constants.USER_AGREEMENT, from: 1 }
|
||||
})
|
||||
})
|
||||
if (StrUtil.isNotEmpty(this.vipMeal?.sign_value) && this.payType === 1) {
|
||||
|
|
|
|||
|
|
@ -72,13 +72,15 @@ struct VideoPlayerPage {
|
|||
.height('100%')
|
||||
.backgroundColor(Color.Black)
|
||||
.controls(false) // 设置是否显示默认控制条
|
||||
.autoPlay(true) // 设置是否自动播放
|
||||
.autoPlay(false) // 设置是否自动播放
|
||||
.loop(false) // 设置是否循环播放
|
||||
.objectFit(ImageFit.Contain) // 设置视频填充模式
|
||||
.onPrepared((event) => {
|
||||
.onPrepared(async (event) => {
|
||||
if (event) {
|
||||
this.durationTime = event.duration
|
||||
}
|
||||
await avSessionManager.activate()
|
||||
this.controller.start()
|
||||
})
|
||||
.onUpdate((event) => {
|
||||
if (event) {
|
||||
|
|
|
|||
|
|
@ -5,22 +5,38 @@ import { window } from '@kit.ArkUI';
|
|||
@Entry
|
||||
@ComponentV2
|
||||
struct WebPage {
|
||||
windowStage: window.WindowStage = AppStorage.get("windowStage") as window.WindowStage;
|
||||
private windowStage: window.WindowStage = AppStorage.get("windowStage") as window.WindowStage;
|
||||
|
||||
controller: webview.WebviewController = new webview.WebviewController();
|
||||
private controller: webview.WebviewController = new webview.WebviewController();
|
||||
|
||||
private from: number = 0
|
||||
|
||||
@Local title: string = '';
|
||||
@Local url: string = '';
|
||||
|
||||
aboutToAppear(): void {
|
||||
this.windowStage.getMainWindowSync().setWindowSystemBarProperties({
|
||||
statusBarColor: '#00000000',
|
||||
statusBarContentColor: '#000000'
|
||||
});
|
||||
this.initParams();
|
||||
}
|
||||
|
||||
aboutToDisappear(): void {
|
||||
if (this.from != 0) {
|
||||
this.windowStage.getMainWindowSync().setWindowSystemBarProperties({
|
||||
statusBarColor: '#00000000',
|
||||
statusBarContentColor: '#FFFFFF'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
initParams() {
|
||||
const params = this.getUIContext().getRouter().getParams() as Record<string, Object>;
|
||||
if (params) {
|
||||
this.title = params.title as string;
|
||||
this.url = params.url as string;
|
||||
this.from = params.from as number
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue