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
xugenyuan
2024-06-14 13:42:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b22f0962a6ecb09aa1a4315bc893f37ec97d882e
b22f0962
1 parent
ffe20247
ref |> 解决定位权限弹框提示问题
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
21 deletions
sight_harmony/features/wdHwAbility/src/main/module.json5
sight_harmony/products/phone/src/main/ets/pages/MainPage.ets
sight_harmony/features/wdHwAbility/src/main/module.json5
View file @
b22f096
...
...
@@ -11,17 +11,5 @@
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
,
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.APPROXIMATELY_LOCATION"
,
"reason"
:
"$string:location_reason"
,
"usedScene"
:
{
"abilities"
:
[
"FormAbility"
],
"when"
:
"inuse"
}
}
]
}
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/ets/pages/MainPage.ets
View file @
b22f096
import { LogoutViewModel
, PermissionDesComponent
} from 'wdComponent';
import { LogoutViewModel } from 'wdComponent';
import { BreakpointConstants } from 'wdConstant';
import { common } from '@kit.AbilityKit';
import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger, MpaasUpgradeCheck, WindowModel } from 'wdKit';
import { promptAction, window } from '@kit.ArkUI';
import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog"
...
...
@@ -20,7 +19,6 @@ struct MainPage {
private breakpointSystem: BreakpointSystem = new BreakpointSystem()
@StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string =
BreakpointConstants.BREAKPOINT_XS;
@State isPermission: boolean = false
upgradeDialogController?: CustomDialogController
watchCurrentBreakpoint() {
...
...
@@ -37,9 +35,6 @@ struct MainPage {
EmitterUtils.receiveEvent(EmitterEventId.FORCE_USER_LOGIN_OUT, () => {
LogoutViewModel.clearLoginInfo()
})
EmitterUtils.receiveEvent(EmitterEventId.LOCATION, () => {
this.isPermission = true
})
}
pageTransition() {
...
...
@@ -114,9 +109,6 @@ struct MainPage {
build() {
Stack({ alignContent: Alignment.Top }) {
BottomNavigationComponent()
if (this.isPermission) {
PermissionDesComponent()
}
}
}
}
...
...
Please
register
or
login
to post a comment