设置拨打电话权限、修改定位

This commit is contained in:
zhouyanli
2026-05-25 09:50:28 +08:00
parent c4d91787b5
commit 1b0e47e79e
4 changed files with 32 additions and 14 deletions

View File

@@ -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;
}