fix 有bg没有正确返回image的bug

This commit is contained in:
damonyuan 2024-11-15 01:03:46 +08:00
parent 54c69af36d
commit c67c0fd2cb
1 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,9 @@ public class IndexServiceImpl implements IIndexService {
if (StringUtils.isNotNull(tempJSON.getString("image"))) { if (StringUtils.isNotNull(tempJSON.getString("image"))) {
tempJSON.put("image", UrlUtils.toAbsoluteUrl(tempJSON.getString("image"))); tempJSON.put("image", UrlUtils.toAbsoluteUrl(tempJSON.getString("image")));
} }
if (StringUtils.isNotNull(tempJSON.getString("bg"))) {
tempJSON.put("bg", UrlUtils.toAbsoluteUrl(tempJSON.getString("bg")));
}
if (StringUtils.isNotNull(tempJSON.getString("qrcode"))) { if (StringUtils.isNotNull(tempJSON.getString("qrcode"))) {
tempJSON.put("qrcode", UrlUtils.toAbsoluteUrl(tempJSON.getString("qrcode"))); tempJSON.put("qrcode", UrlUtils.toAbsoluteUrl(tempJSON.getString("qrcode")));
} }
@ -97,6 +100,7 @@ public class IndexServiceImpl implements IIndexService {
for (int j = 0; j < tempArray.size(); j++) { for (int j = 0; j < tempArray.size(); j++) {
JSONObject tempImageJson = tempArray.getJSONObject(j); JSONObject tempImageJson = tempArray.getJSONObject(j);
tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image"))); tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image")));
tempImageJson.put("bg", UrlUtils.toAbsoluteUrl(tempImageJson.getString("bg")));
} }
} }
} }
@ -138,6 +142,9 @@ public class IndexServiceImpl implements IIndexService {
if (StringUtils.isNotNull(tempJSON.getString("image"))) { if (StringUtils.isNotNull(tempJSON.getString("image"))) {
tempJSON.put("image", UrlUtils.toAbsoluteUrl(tempJSON.getString("image"))); tempJSON.put("image", UrlUtils.toAbsoluteUrl(tempJSON.getString("image")));
} }
if (StringUtils.isNotNull(tempJSON.getString("bg"))) {
tempJSON.put("bg", UrlUtils.toAbsoluteUrl(tempJSON.getString("bg")));
}
if (StringUtils.isNotNull(tempJSON.getString("qrcode"))) { if (StringUtils.isNotNull(tempJSON.getString("qrcode"))) {
tempJSON.put("qrcode", UrlUtils.toAbsoluteUrl(tempJSON.getString("qrcode"))); tempJSON.put("qrcode", UrlUtils.toAbsoluteUrl(tempJSON.getString("qrcode")));
} }
@ -146,6 +153,7 @@ public class IndexServiceImpl implements IIndexService {
for (int j = 0; j < tempArray.size(); j++) { for (int j = 0; j < tempArray.size(); j++) {
JSONObject tempImageJson = tempArray.getJSONObject(j); JSONObject tempImageJson = tempArray.getJSONObject(j);
tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image"))); tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image")));
tempImageJson.put("bg", UrlUtils.toAbsoluteUrl(tempImageJson.getString("bg")));
} }
} }
} }