设置拨打电话权限、修改定位
This commit is contained in:
@@ -89,7 +89,7 @@ const handleTextInput = (e) => {
|
||||
const reverseGeocode = async (lng, lat) => {
|
||||
if (!AMAP_KEY) return null;
|
||||
try {
|
||||
const [err, res] = await uni.request({
|
||||
const res = await uni.request({
|
||||
url: 'https://restapi.amap.com/v3/geocode/regeo',
|
||||
data: {
|
||||
key: AMAP_KEY,
|
||||
@@ -97,7 +97,6 @@ const reverseGeocode = async (lng, lat) => {
|
||||
extensions: 'base'
|
||||
}
|
||||
});
|
||||
if (err) throw err;
|
||||
if (res.data?.status === '1' && res.data.regeocode?.formatted_address) {
|
||||
return res.data.regeocode.formatted_address;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user