🐛 缩略图统一改为绝对路径

pull/98/head
ruibaby 2019-02-24 10:05:20 +08:00
parent 8e8471e331
commit 585e1e4329
2 changed files with 3 additions and 3 deletions

View File

@ -253,7 +253,7 @@ public class PageController {
post.setPostContent(MarkdownUtils.renderMarkdown(post.getPostContentMd()));
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
post.setPostThumbnail("/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
}
postService.create(post);
logsService.save(LogsRecord.PUSH_PAGE, post.getPostTitle(), request);

View File

@ -150,7 +150,7 @@ public class PostController extends BaseController {
}
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
post.setPostThumbnail("/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
}
postService.create(post);
logsService.save(LogsRecord.PUSH_POST, post.getPostTitle(), request);
@ -189,7 +189,7 @@ public class PostController extends BaseController {
}
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
post.setPostThumbnail("/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
}
post = postService.create(post);
if (null != post) {