mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-23 11:09:29 +08:00
fixed: 需要登录的api的跨域问题
This commit is contained in:
@@ -72,14 +72,14 @@ public class IpUtil {
|
||||
try {
|
||||
String rspStr = HttpUtil.sendGet(IP_URL, "ip=" + ip + "&json=true", "GBK");
|
||||
if (StringUtil.isEmpty(rspStr)) {
|
||||
log.error("获取地理位置异常 {}", ip);
|
||||
log.error("获取地理位置异常1 {}", ip);
|
||||
return UNKNOWN;
|
||||
}
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
Response obj = objectMapper.readValue(rspStr, Response.class);
|
||||
return String.format("%s-%s", obj.getPro(), obj.getCity());
|
||||
} catch (Exception e) {
|
||||
log.error("获取地理位置异常 {}", ip);
|
||||
log.error("获取地理位置异常2 {} msg {}", ip, e.getMessage());
|
||||
}
|
||||
|
||||
return UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user