@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.2.18</version>
<version>1.2.19</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -14,8 +14,9 @@ public class IPController {
private LookupService lookupService;
@GetMapping("/{ipAddr}")
public String getIpInfo(@PathVariable String ipAddr) {
public JSONObject getIpInfo(@PathVariable String ipAddr) {
String city = lookupService.getLocation(ipAddr).city;
JSONObject result = new JSONObject();
return city;
result.put("city", lookupService.getLocation(ipAddr).city);
return result;
}
@ -41,7 +41,7 @@ define(['../app'], function (app) {
$scope.order = order.data;
$scope.getPayLocation=function (ip) {
$http.get('/dev/ip/'+ip).then(function (res) {
$scope.pay_location = res.data;
$scope.pay_location = res.data.city;
})
}]);