Merge pull request #7002 from dataease/pr@dev@fix_blog-url

fix: 修复首页最新动态跳转链接不正确问题
This commit is contained in:
王嘉豪 2023-12-05 11:19:56 +08:00 committed by GitHub
commit 29fc0b2d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {