ref |> 解决定位权限弹框提示问题
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Showing
2 changed files
with
1 additions
and
21 deletions
| @@ -11,17 +11,5 @@ | @@ -11,17 +11,5 @@ | ||
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| 13 | "pages": "$profile:main_pages", | 13 | "pages": "$profile:main_pages", |
| 14 | - "requestPermissions": [ | ||
| 15 | - { | ||
| 16 | - "name": "ohos.permission.APPROXIMATELY_LOCATION", | ||
| 17 | - "reason": "$string:location_reason", | ||
| 18 | - "usedScene": { | ||
| 19 | - "abilities": [ | ||
| 20 | - "FormAbility" | ||
| 21 | - ], | ||
| 22 | - "when": "inuse" | ||
| 23 | - } | ||
| 24 | - } | ||
| 25 | - ] | ||
| 26 | } | 14 | } |
| 27 | } | 15 | } |
| 1 | -import { LogoutViewModel, PermissionDesComponent } from 'wdComponent'; | 1 | +import { LogoutViewModel } from 'wdComponent'; |
| 2 | import { BreakpointConstants } from 'wdConstant'; | 2 | import { BreakpointConstants } from 'wdConstant'; |
| 3 | 3 | ||
| 4 | -import { common } from '@kit.AbilityKit'; | ||
| 5 | import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger, MpaasUpgradeCheck, WindowModel } from 'wdKit'; | 4 | import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger, MpaasUpgradeCheck, WindowModel } from 'wdKit'; |
| 6 | import { promptAction, window } from '@kit.ArkUI'; | 5 | import { promptAction, window } from '@kit.ArkUI'; |
| 7 | import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog" | 6 | import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog" |
| @@ -20,7 +19,6 @@ struct MainPage { | @@ -20,7 +19,6 @@ struct MainPage { | ||
| 20 | private breakpointSystem: BreakpointSystem = new BreakpointSystem() | 19 | private breakpointSystem: BreakpointSystem = new BreakpointSystem() |
| 21 | @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = | 20 | @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = |
| 22 | BreakpointConstants.BREAKPOINT_XS; | 21 | BreakpointConstants.BREAKPOINT_XS; |
| 23 | - @State isPermission: boolean = false | ||
| 24 | upgradeDialogController?: CustomDialogController | 22 | upgradeDialogController?: CustomDialogController |
| 25 | 23 | ||
| 26 | watchCurrentBreakpoint() { | 24 | watchCurrentBreakpoint() { |
| @@ -37,9 +35,6 @@ struct MainPage { | @@ -37,9 +35,6 @@ struct MainPage { | ||
| 37 | EmitterUtils.receiveEvent(EmitterEventId.FORCE_USER_LOGIN_OUT, () => { | 35 | EmitterUtils.receiveEvent(EmitterEventId.FORCE_USER_LOGIN_OUT, () => { |
| 38 | LogoutViewModel.clearLoginInfo() | 36 | LogoutViewModel.clearLoginInfo() |
| 39 | }) | 37 | }) |
| 40 | - EmitterUtils.receiveEvent(EmitterEventId.LOCATION, () => { | ||
| 41 | - this.isPermission = true | ||
| 42 | - }) | ||
| 43 | } | 38 | } |
| 44 | 39 | ||
| 45 | pageTransition() { | 40 | pageTransition() { |
| @@ -114,9 +109,6 @@ struct MainPage { | @@ -114,9 +109,6 @@ struct MainPage { | ||
| 114 | build() { | 109 | build() { |
| 115 | Stack({ alignContent: Alignment.Top }) { | 110 | Stack({ alignContent: Alignment.Top }) { |
| 116 | BottomNavigationComponent() | 111 | BottomNavigationComponent() |
| 117 | - if (this.isPermission) { | ||
| 118 | - PermissionDesComponent() | ||
| 119 | - } | ||
| 120 | } | 112 | } |
| 121 | } | 113 | } |
| 122 | } | 114 | } |
-
Please register or login to post a comment