feat 初始化menu 默认开启caache

fix 修复绑定手机的提示错误显示的bug
fix 装修移动端没有正确显示图片的bug
This commit is contained in:
damonyuan
2024-11-09 20:20:14 +08:00
parent 8121c69f07
commit 4ff64636fc
6 changed files with 143 additions and 55 deletions

View File

@@ -76,6 +76,32 @@ public class IndexServiceImpl implements IIndexService {
articleList.add(map);
}
String data = decoratePage.getData();
JSONArray dataArray = JSONArray.parseArray(data);
for (int i = 0; i < dataArray.size() ; i++) {
JSONObject dataJson = dataArray.getJSONObject(i);
JSONArray tempArray = dataJson.getJSONObject("content").getJSONArray("data");
if (StringUtils.isNull(tempArray)) {
JSONObject tempJSON = dataJson.getJSONObject("content");
if (StringUtils.isNull(tempJSON)) {
continue;
} else {
if (StringUtils.isNotNull(tempJSON.getString("image"))) {
tempJSON.put("image", UrlUtils.toAbsoluteUrl(tempJSON.getString("image")));
}
if (StringUtils.isNotNull(tempJSON.getString("qrcode"))) {
tempJSON.put("qrcode", UrlUtils.toAbsoluteUrl(tempJSON.getString("qrcode")));
}
}
} else {
for (int j = 0; j < tempArray.size(); j++) {
JSONObject tempImageJson = tempArray.getJSONObject(j);
tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image")));
}
}
}
decoratePage.setData(dataArray.toJSONString());
response.put("domain", UrlUtils.domain());
response.put("page", decoratePage);
response.put("article", articleList);
@@ -98,6 +124,34 @@ public class IndexServiceImpl implements IIndexService {
Assert.notNull(decoratePage, "数据不存在!");
String data = decoratePage.getData();
if (StringUtils.isJsonArrayString(data)) {
JSONArray dataArray = JSONArray.parseArray(data);
for (int i = 0; i < dataArray.size(); i++) {
JSONObject dataJson = dataArray.getJSONObject(i);
JSONArray tempArray = dataJson.getJSONObject("content").getJSONArray("data");
if (StringUtils.isNull(tempArray)) {
JSONObject tempJSON = dataJson.getJSONObject("content");
if (StringUtils.isNull(tempJSON)) {
continue;
} else {
if (StringUtils.isNotNull(tempJSON.getString("image"))) {
tempJSON.put("image", UrlUtils.toAbsoluteUrl(tempJSON.getString("image")));
}
if (StringUtils.isNotNull(tempJSON.getString("qrcode"))) {
tempJSON.put("qrcode", UrlUtils.toAbsoluteUrl(tempJSON.getString("qrcode")));
}
}
} else {
for (int j = 0; j < tempArray.size(); j++) {
JSONObject tempImageJson = tempArray.getJSONObject(j);
tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image")));
}
}
}
decoratePage.setData(dataArray.toJSONString());
}
Map<String, Object> response = new LinkedHashMap<>();
response.put("type", decoratePage.getType());
response.put("name", decoratePage.getName());

View File

@@ -450,6 +450,7 @@ public class LoginServiceImpl implements ILoginService {
vo.setIsBindMobile(!StringUtils.isEmpty(mobile));
vo.setToken(StpUtil.getTokenValue());
vo.setIsNew(isNew);
vo.setMobile(mobile);
//保存登录信息到session
userSessionMapper.delete(new QueryWrapper<UserSession>().eq("user_id", userId).eq("terminal", terminal));

View File

@@ -123,11 +123,24 @@ public class PcServiceImpI implements IPcService {
for (int i = 0; i < dataArray.size() ; i++) {
JSONObject dataJson = dataArray.getJSONObject(i);
JSONArray tempArray = dataJson.getJSONObject("content").getJSONArray("data");
for (int j = 0; j < tempArray.size() ; j++) {
JSONObject tempImageJson = tempArray.getJSONObject(j);
tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image")));
if (StringUtils.isNull(tempArray)) {
JSONObject tempJSON = dataJson.getJSONObject("content");
if (StringUtils.isNull(tempJSON)) {
continue;
} else {
if (StringUtils.isNotNull(tempJSON.getString("image"))) {
tempJSON.put("image", UrlUtils.toAbsoluteUrl(tempJSON.getString("image")));
}
if (StringUtils.isNotNull(tempJSON.getString("qrcode"))) {
tempJSON.put("qrcode", UrlUtils.toAbsoluteUrl(tempJSON.getString("qrcode")));
}
}
} else {
for (int j = 0; j < tempArray.size(); j++) {
JSONObject tempImageJson = tempArray.getJSONObject(j);
tempImageJson.put("image", UrlUtils.toAbsoluteUrl(tempImageJson.getString("image")));
}
}
}

View File

@@ -18,6 +18,9 @@ public class LoginTokenVo implements Serializable {
@ApiModelProperty(value = "绑定手机")
private Boolean isBindMobile;
@ApiModelProperty(value = "绑定手机")
private String mobile;
@ApiModelProperty(value = "登录令牌")
private String token;