提交 18ad86b7 编写于 作者: zhaofengliang920817's avatar zhaofengliang920817

iOS |location-tencent api 插件|修复编译bug

上级 7062ed4c
...@@ -55,8 +55,8 @@ class LBSLocation implements TencentLBSLocationManagerDelegate { ...@@ -55,8 +55,8 @@ class LBSLocation implements TencentLBSLocationManagerDelegate {
this.locationManager.requestWhenInUseAuthorization() this.locationManager.requestWhenInUseAuthorization()
} else if (status == CLAuthorizationStatus.denied || status == CLAuthorizationStatus.restricted) { } else if (status == CLAuthorizationStatus.denied || status == CLAuthorizationStatus.restricted) {
let ret = new UniError("uni-getLocation-tencent", -30, "permission missed."); let ret = new UniError("uni-getLocation-tencent", -30, "permission missed.");
options.fail?.(ret) this.locationOptions?.fail?.(ret)
options.complete?.(ret) this.locationOptions?.complete?.(ret)
} }
} }
} }
...@@ -141,13 +141,13 @@ class LBSLocation implements TencentLBSLocationManagerDelegate { ...@@ -141,13 +141,13 @@ class LBSLocation implements TencentLBSLocationManagerDelegate {
// 实现定位出错的 delegate 方法 // 实现定位出错的 delegate 方法
tencentLBSDidChangeAuthorization(manager : TencentLBSLocationManager) { tencentLBSDidChangeAuthorization(manager : TencentLBSLocationManager) {
const status = this.getAuthorizationStatus() const status = CLLocationManager.authorizationStatus()
if (status == CLAuthorizationStatus.denied || status == CLAuthorizationStatus.restricted) { if (status == CLAuthorizationStatus.denied || status == CLAuthorizationStatus.restricted) {
let ret = new UniError("uni-getLocation-tencent", -30, "permission missed."); let ret = new UniError("uni-getLocation-tencent", -30, "permission missed.");
options.fail?.(ret) this.locationOptions?.fail?.(ret)
options.complete?.(ret) this.locationOptions?.complete?.(ret)
} else if (status == CLAuthorizationStatus.authorizedAlways || status == CLAuthorizationStatus.authorizedWhenInUse) { } else if (status == CLAuthorizationStatus.authorizedAlways || status == CLAuthorizationStatus.authorizedWhenInUse) {
this.getLocation(this.locationOptions) this.getLocation(this.locationOptions!)
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册