|
@@ -1,5 +1,6 @@
|
|
|
package com.gree.mall.miniapp.logic;
|
|
|
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONObject;
|
|
@@ -62,6 +63,7 @@ public class LbsAmapLogic {
|
|
|
}
|
|
|
JSONObject regeocode = jsonObject.getJSONObject("regeocode");
|
|
|
JSONObject addressComponent = regeocode.getJSONObject("addressComponent");
|
|
|
+ Object formatted_address = regeocode.get("formatted_address");
|
|
|
Map<String,String> map = new HashMap<>();
|
|
|
map.put("province",addressComponent.getStr("province"));
|
|
|
if(addressComponent.getStr("city").equals("[]")) {
|
|
@@ -93,6 +95,7 @@ public class LbsAmapLogic {
|
|
|
regionBean.setCityName(city);
|
|
|
regionBean.setAreaName(area);
|
|
|
regionBean.setName(street);
|
|
|
+ regionBean.setFormattedAddress(Convert.toStr(formatted_address));
|
|
|
return regionBean;
|
|
|
}
|
|
|
|