商汤算法图片解决跨域问题
This commit is contained in:
parent
a0749f2573
commit
a5acf77073
|
@ -85,11 +85,12 @@ public class ShangTangWarningController {
|
||||||
event.setLongitude(camera.getBigDecimal("longitude"));
|
event.setLongitude(camera.getBigDecimal("longitude"));
|
||||||
}
|
}
|
||||||
JSONObject image = jsonObject.getJSONObject("image");
|
JSONObject image = jsonObject.getJSONObject("image");
|
||||||
if(image==null){
|
// 用nginx转发解决跨域,使用相对路径(假设对方地址不变)
|
||||||
}else{
|
if(image != null){
|
||||||
String images = image.getString("imageUrl");
|
String images = image.getString("imageUrl");
|
||||||
String all = images.replaceAll(images.substring(19, 26), "7:8070");
|
if (images != null) {
|
||||||
event.setImageUrl(all);
|
event.setImageUrl(images.replace("http://10.132.191.47:30080", ""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
event.setTaskId(jsonObject.getString("taskId"));
|
event.setTaskId(jsonObject.getString("taskId"));
|
||||||
|
|
Loading…
Reference in New Issue