fix: 修复首页最新动态跳转链接不正确问题

This commit is contained in:
wangjiahao 2023-12-05 11:17:56 +08:00
parent 5a100ee572
commit cebad4d908

View File

@ -18,6 +18,8 @@ import java.util.*;
@Service
public class ReptileService {
String blogUrl = "https://blog.fit2cloud.com/categories/dataease";
String blogBaseUrl = "https://blog.fit2cloud.com";
//获取最新的前几条数据
private static int infoCount=5;
@ -33,7 +35,7 @@ public class ReptileService {
Element info = elementsContent.get(i).children().get(0);
Map<String, String> infoMap = new HashMap();
infoMap.put("title",info.attr("title"));
infoMap.put("href",info.attr("href"));
infoMap.put("href",blogBaseUrl + info.attr("href"));
result.add(infoMap);
}
} catch (Exception e) {