|
@@ -1,4 +1,4 @@
|
|
|
-import { AppUtil, DeviceUtil, DisplayUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils';
|
|
|
|
|
|
|
+import { AppUtil, DeviceUtil, DisplayUtil, LogUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils';
|
|
|
import TitleBar from '../view/TitleBar';
|
|
import TitleBar from '../view/TitleBar';
|
|
|
import { router } from '@kit.ArkUI';
|
|
import { router } from '@kit.ArkUI';
|
|
|
import mainViewModel, { MainViewModel } from '../viewmodel/MainViewModel';
|
|
import mainViewModel, { MainViewModel } from '../viewmodel/MainViewModel';
|
|
@@ -246,8 +246,8 @@ struct NewIndex {
|
|
|
AboutPage()
|
|
AboutPage()
|
|
|
.visibility(this.mType === 4 ? Visibility.Visible : Visibility.None)
|
|
.visibility(this.mType === 4 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
|
|
|
- // 抽屉打开时的遮罩层,用于拦截点击事件
|
|
|
|
|
- if (this.isShowDrawer) {
|
|
|
|
|
|
|
+ // 抽屉打开时的遮罩层,用于拦截点击事件 这个只能正常尺寸的手机竖屏的才能生效
|
|
|
|
|
+ if (this.isShowDrawer&&this.isPhonePortrait()) {
|
|
|
Column()
|
|
Column()
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height('100%')
|
|
.height('100%')
|
|
@@ -273,6 +273,21 @@ struct NewIndex {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //是不是正常的手机竖屏
|
|
|
|
|
+ isPhonePortrait() {
|
|
|
|
|
+ LogUtil.info('twocold this.currentHeightBreakpoint = '+this.currentHeightBreakpoint)
|
|
|
|
|
+ LogUtil.info('twocold this.currentWidthBreakpoint = '+this.currentWidthBreakpoint)
|
|
|
|
|
+ if(DeviceUtil.getDeviceType() === resourceManager.DeviceType.DEVICE_TYPE_PHONE
|
|
|
|
|
+ &&this.currentHeightBreakpoint == HeightBreakpoint.HEIGHT_LG
|
|
|
|
|
+ &&this.currentWidthBreakpoint==WidthBreakpoint.WIDTH_SM){//如果是手机横屏,返回false
|
|
|
|
|
+
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 判断是否横屏
|
|
* 判断是否横屏
|
|
|
* @returns
|
|
* @returns
|
|
@@ -295,17 +310,7 @@ struct NewIndex {
|
|
|
getLeftView() {
|
|
getLeftView() {
|
|
|
Column() {
|
|
Column() {
|
|
|
Column() {
|
|
Column() {
|
|
|
- // 抽屉顶部背景图
|
|
|
|
|
- // Image($r('app.media.bg_music'))
|
|
|
|
|
- // .width('100%')
|
|
|
|
|
- // .visibility(this.isCoverOpacity()?Visibility.None:Visibility.Visible)
|
|
|
|
|
- // .height(180)
|
|
|
|
|
- // .borderRadius({
|
|
|
|
|
- // topLeft: 0,
|
|
|
|
|
- // topRight : 20,
|
|
|
|
|
- // bottomLeft: 0,
|
|
|
|
|
- // bottomRight: 0
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+
|
|
|
this.buildUserInfoCard()
|
|
this.buildUserInfoCard()
|
|
|
|
|
|
|
|
this.getDrawerView()
|
|
this.getDrawerView()
|