"use strict";const e=require("../vendor.js");exports.getMapLbs=function(){return new Promise((o,c)=>{e.index.getLocation({type:"gcj02",altitude:!0,isHighAccuracy:!0,success(c){console.log(c,"经纬度");const s=`https://restapi.amap.com/v3/geocode/regeo?location=${c.longitude},${c.latitude}&key=be262c006216c542747fce766130cee3`;e.index.request({url:s,method:"GET",success(e){var c;console.log(e,"address"),o(null==(c=null==e?void 0:e.data)?void 0:c.regeocode)},fail(c){o({address:"拒绝定位"}),console.error("获取地址失败:",c),e.index.showModal({title:"提示",content:"请先允许定位！",success:function(o){o.confirm?(e.index.openSetting(),console.log("用户点击确定")):o.cancel&&console.log("用户点击取消")}})}})},fail(e){console.log("拒绝定位",e)}})})};
