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