diff --git a/app/src/main/ets/pages/map/MapPage.ets b/app/src/main/ets/pages/map/MapPage.ets index 7487384..889c299 100644 --- a/app/src/main/ets/pages/map/MapPage.ets +++ b/app/src/main/ets/pages/map/MapPage.ets @@ -24,8 +24,9 @@ struct MapPage { .width(60) .backgroundColor(Color.Red) .onClick(() => { - if (this.isLocationPermission) { - } + this.locationHelper.getLocationAddress( 31.12, 121.11, 1, (error: BusinessError, data: geoLocationManager.GeoAddress[]) => { + + }) }) SymbolGlyph($r('sys.symbol.xmark')).width(24).height(24).borderRadius(12).onClick(() => { @@ -45,16 +46,13 @@ struct MapPage { build() { Column(){ - if (this.isShowLocationPopup) { - this.locationViewBuilder(); - } + this.locationViewBuilder(); Text(this.locText); }.width('100%').height('100%') } aboutToAppear(): void { this.locationHelper.requestPermissionsFromUser((allowScope: boolean, allowPrecision: boolean) => { - }) } } \ No newline at end of file diff --git a/app/src/main/ets/pages/system/SchemePage.ets b/app/src/main/ets/pages/system/SchemePage.ets index a8fb2d3..a5d0e9f 100644 --- a/app/src/main/ets/pages/system/SchemePage.ets +++ b/app/src/main/ets/pages/system/SchemePage.ets @@ -13,18 +13,22 @@ struct SchemePage { } }) - Button("Open").width(120).height(36).onClick(() => { - this.openScheme() + Button("OpenApp").width(120).height(36).onClick(() => { + this.openScheme('alipays://platformapi/startapp?appId=20000001') + }).margin({ top: 48 }) + + Button("OpenStore").width(120).height(36).onClick(() => { + this.openScheme('store://appgallery.huawei.com/app/detail?id=com.alipay.mobile.client') }).margin({ top: 48 }) } } - openScheme() { + openScheme(uri: string) { let context = getContext(this) as common.UIAbilityContext; let wantInfo: Want = { - action: 'ohos.want.action.viewData', - entities: ['entity.system.browsable'], - uri: 'https://devwiki.net' + // action: 'ohos.want.action.viewData', + // entities: ['entity.system.browsable'], + uri: uri } context.startAbility(wantInfo); }