uni-app 打包后使用 Geolocation(定位) 系统定位功能,APP获取定位无效
uni-app 打包后使用 Geolocation(定位) 系统定位功能,APP获取定位无效 产品分类:uniapp/App
| 项目 | 内容 |
|---|---|
| PC开发环境操作系统 | Mac |
| PC开发环境操作系统版本号 | macOS Monterey 12.0.1 |
| HBuilderX类型 | 正式 |
| HBuilderX版本号 | 3.3.5 |
| 手机系统 | 全部 |
| 手机厂商 | 苹果 |
| 页面类型 | vue |
| vue版本 | vue2 |
| 打包方式 | 云端 |
| 项目创建方式 | HBuilderX |
测试过的手机: 华为 mate 30、华为 mate 40、iPhone XS
示例代码:
getLocation() {
return new Promise((resolve, reject) => {
uni.getLocation({
type: 'gcj02',
geocode: true,
success: res => {
resolve(res)
},
fail: error => {
reject(error)
}
})
})
}
更多关于uni-app 打包后使用 Geolocation(定位) 系统定位功能,APP获取定位无效的实战教程也可以访问 https://www.itying.com/category-93-b0.html
1 回复
更多关于uni-app 打包后使用 Geolocation(定位) 系统定位功能,APP获取定位无效的实战教程也可以访问 https://www.itying.com/category-93-b0.html

