fix 优化了登录的记住密码描述,
修改了个人中心的样式。优化了编辑栏位
This commit is contained in:
@@ -58,7 +58,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
// http.requiresChannel().anyRequest().requiresSecure();
|
// http.requiresChannel().anyRequest().requiresSecure();
|
||||||
|
|
||||||
// 记住我配置 默认为remember-me
|
// 记住我配置 默认为remember-me
|
||||||
http.rememberMe();
|
http.rememberMe().tokenValiditySeconds(604800);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户授权验证
|
// 用户授权验证
|
||||||
|
|||||||
@@ -57,13 +57,14 @@ public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements Bl
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addRecord(BlogWithUser blogRead, String sessionId) {
|
private void addRecord(BlogWithUser blogRead, String sessionId) {
|
||||||
String value = redisUtils.get(sessionId + blogRead.getBid());
|
String bid = blogRead.getBid();
|
||||||
|
String value = redisUtils.get(sessionId + bid);
|
||||||
Blog blog = new Blog();
|
Blog blog = new Blog();
|
||||||
blog.setBid(blogRead.getBid());
|
|
||||||
if (!QuinnConstant.SESSION_VIEW_KEY.equals(value)){
|
if (!QuinnConstant.SESSION_VIEW_KEY.equals(value)){
|
||||||
blog.setViews(blogRead.getViews()+1);
|
blog.setViews(blogRead.getViews()+1);
|
||||||
redisUtils.set(sessionId + blog.getBid(),QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
|
blogRead.setViews(blogRead.getViews()+1);
|
||||||
updateById(blog);
|
redisUtils.set(sessionId + bid,QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
|
||||||
|
update(blog,new QueryWrapper<Blog>().eq("bid",bid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -196,9 +196,12 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
|
|||||||
*/
|
*/
|
||||||
String value = redisUtils.get(sessionId + source.getSid());
|
String value = redisUtils.get(sessionId + source.getSid());
|
||||||
if (!QuinnConstant.SESSION_VIEW_KEY.equals(value)){
|
if (!QuinnConstant.SESSION_VIEW_KEY.equals(value)){
|
||||||
source.setDownRecord(source.getDownRecord() + 1);
|
Source update = new Source();
|
||||||
|
update.setId(source.getId());
|
||||||
|
update.setDownRecord(source.getDownRecord() + 1);
|
||||||
redisUtils.set(sessionId + source.getSid(),QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
|
redisUtils.set(sessionId + source.getSid(),QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
|
||||||
updateById(source);
|
// 不更新大字段
|
||||||
|
updateById(update);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* 如果使用该初始化方法,请一定要在html放三个标签,或者直接看代码修改内容
|
/* 如果使用该初始化方法,请一定要在html放三个标签,或者直接看代码修改内容
|
||||||
* <div id="editor-toolbar"></div>
|
* <div id="editor-toolbar"></div>
|
||||||
* <div id="editor-text-area" style="height: 600px;border: 1px solid lightgrey"></div>
|
* <div id="editor-text-area" style="border: 1px solid lightgrey"></div>
|
||||||
* <textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
* <textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
||||||
* 另外此方法依赖layer.js & axios.js 做遮罩弹框,
|
* 另外此方法依赖layer.js & axios.js 做遮罩弹框,
|
||||||
* 也可以重写 uploadImage:onFailed | onError 自定义提示
|
* 也可以重写 uploadImage:onFailed | onError 自定义提示
|
||||||
@@ -13,7 +13,7 @@ E.i18nChangeLanguage(LANG)
|
|||||||
|
|
||||||
const editorConfig = {
|
const editorConfig = {
|
||||||
placeholder: '请输入...',
|
placeholder: '请输入...',
|
||||||
scroll: true, // 禁止编辑器滚动
|
scroll: false, // 禁止编辑器滚动
|
||||||
MENU_CONF: {
|
MENU_CONF: {
|
||||||
uploadImage: {
|
uploadImage: {
|
||||||
fieldName: 'your-fileName',
|
fieldName: 'your-fileName',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* 如果使用该初始化方法,请一定要在html放三个标签,或者直接看代码修改内容
|
/* 如果使用该初始化方法,请一定要在html放三个标签,或者直接看代码修改内容
|
||||||
* <div id="editor-toolbar"></div>
|
* <div id="editor-toolbar"></div>
|
||||||
* <div id="editor-text-area" style="height: 600px;border: 1px solid lightgrey"></div>
|
* <div id="editor-text-area" style="border: 1px solid lightgrey"></div>
|
||||||
* <textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
* <textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
||||||
* 另外此方法依赖layer.js & axios.js 做遮罩弹框,
|
* 另外此方法依赖layer.js & axios.js 做遮罩弹框,
|
||||||
* 也可以重写 uploadImage:onFailed | onError 自定义提示
|
* 也可以重写 uploadImage:onFailed | onError 自定义提示
|
||||||
@@ -14,7 +14,7 @@ E.i18nChangeLanguage(LANG)
|
|||||||
const editorConfig = {
|
const editorConfig = {
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
scroll: true, // 禁止编辑器滚动
|
scroll: false, // 禁止编辑器滚动
|
||||||
}
|
}
|
||||||
|
|
||||||
// 先创建 editor
|
// 先创建 editor
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<p>论坛详情</p>
|
<p>论坛详情</p>
|
||||||
<div id="blog-content">
|
<div id="blog-content">
|
||||||
<div id="editor-toolbar"></div>
|
<div id="editor-toolbar"></div>
|
||||||
<div id="editor-text-area" style="height: 600px;border: 1px solid lightgrey"></div>
|
<div id="editor-text-area" style="border: 1px solid lightgrey"></div>
|
||||||
<textarea id="content-textarea" name="content" th:text="${blog.getContent()}" style="display: none;" minlength="30" required></textarea>
|
<textarea id="content-textarea" name="content" th:text="${blog.getContent()}" style="display: none;" minlength="30" required></textarea>
|
||||||
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
<hr style="margin-top: 18px">
|
<hr style="margin-top: 18px">
|
||||||
|
|
||||||
<!--文章主体内容-->
|
<!--文章主体内容-->
|
||||||
<div id="editor-text-area" style="height: 600px"></div>
|
<div id="editor-text-area"></div>
|
||||||
<textarea id="content-textarea" th:text="${blog.getContent()}" name="content" style="display: none;"></textarea>
|
<textarea id="content-textarea" th:text="${blog.getContent()}" name="content" style="display: none;"></textarea>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<p>文章内容</p>
|
<p>文章内容</p>
|
||||||
<div id="blog-content">
|
<div id="blog-content">
|
||||||
<div id="editor-toolbar"></div>
|
<div id="editor-toolbar"></div>
|
||||||
<div id="editor-text-area" style="height: 600px;border: 1px solid lightgrey"></div>
|
<div id="editor-text-area" style="border: 1px solid lightgrey"></div>
|
||||||
<textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
<textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
||||||
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="checkbox float-left mb-3">
|
<div class="checkbox float-left mb-3">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="remember-me"> 记住密码
|
<input type="checkbox" name="remember-me"> 7天免登录
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-dark btn-block" type="button" onclick="loginSubmit()">登 录</button>
|
<button class="btn btn-dark btn-block" type="button" onclick="loginSubmit()">登 录</button>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
<div id="blog-content">
|
<div id="blog-content">
|
||||||
<div id="editor-toolbar"></div>
|
<div id="editor-toolbar"></div>
|
||||||
<div id="editor-text-area" style="height: 600px;border: 1px solid lightgrey"></div>
|
<div id="editor-text-area" style="border: 1px solid lightgrey"></div>
|
||||||
<textarea id="content-textarea" name="sourceContent" style="display: none;" th:text="${source.getSourceContent()}"></textarea>
|
<textarea id="content-textarea" name="sourceContent" style="display: none;" th:text="${source.getSourceContent()}"></textarea>
|
||||||
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
|
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
|
||||||
<style>
|
<style>
|
||||||
#maxLength {
|
#maxLength {
|
||||||
max-width: 500px;
|
max-width: 320px;
|
||||||
white-space: nowrap; /* 不换行 */
|
white-space: nowrap; /* 不换行 */
|
||||||
overflow: hidden; /* 超出部分不显示 */
|
overflow: hidden; /* 超出部分不显示 */
|
||||||
text-overflow: ellipsis; /* 超出部分显示为... */
|
text-overflow: ellipsis; /* 超出部分显示为... */
|
||||||
@@ -33,14 +33,13 @@
|
|||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<a th:href="@{'/source/view/'+${source.getSid()}}"
|
<a th:href="@{'/source/view/'+${source.getSid()}}"
|
||||||
class="text-dark font-weight-bold text-decoration-none">
|
class="text-dark font-weight-bold text-decoration-none">
|
||||||
|
<span class="badge badge-primary">
|
||||||
|
[[${source.getCategoryName()}]]
|
||||||
|
</span>
|
||||||
<span th:if="${source.getDownRecord() > 20}" class="badge badge-danger">精</span>
|
<span th:if="${source.getDownRecord() > 20}" class="badge badge-danger">精</span>
|
||||||
[[${source.getSourceName()}]]
|
[[${source.getSourceName()}]]
|
||||||
</a>
|
</a>
|
||||||
<!-- 收藏 -->
|
<p class="float-right" th:text="${#dates.format(source.getGmtUpdate(),'yyyy-MM-dd')}"></p>
|
||||||
<span class="badge badge-primary">
|
|
||||||
[[${source.getCategoryName()}]]
|
|
||||||
</span>
|
|
||||||
<p class="float-right" th:text="${#dates.format(source.getGmtUpdate(),'yyyy-MM-dd HH:mm:ss')}"></p>
|
|
||||||
<div class="small">
|
<div class="small">
|
||||||
<span id="maxLength" th:text="${source.getDetail()}"
|
<span id="maxLength" th:text="${source.getDetail()}"
|
||||||
class="d-block">
|
class="d-block">
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
<div id="blog-content">
|
<div id="blog-content">
|
||||||
<div id="editor-toolbar"></div>
|
<div id="editor-toolbar"></div>
|
||||||
<div id="editor-text-area" style="height: 600px;border: 1px solid lightgrey"></div>
|
<div id="editor-text-area" style="border: 1px solid lightgrey"></div>
|
||||||
<textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
<textarea id="content-textarea" name="content" style="display: none;"></textarea>
|
||||||
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<hr style="margin-top: 18px">
|
<hr style="margin-top: 18px">
|
||||||
|
|
||||||
<!--文章主体内容-->
|
<!--文章主体内容-->
|
||||||
<div id="editor-text-area" style="height: 600px"></div>
|
<div id="editor-text-area"></div>
|
||||||
<textarea id="content-textarea" th:text="${source.getSourceContent()}" name="content" style="display: none;"></textarea>
|
<textarea id="content-textarea" th:text="${source.getSourceContent()}" name="content" style="display: none;"></textarea>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -58,12 +58,13 @@
|
|||||||
<div th:each="blog:${blogList}" class="media text-muted pt-1">
|
<div th:each="blog:${blogList}" class="media text-muted pt-1">
|
||||||
<p class="media-body pb-1 mb-0 small border-bottom border-gray" style="margin-left: 5px">
|
<p class="media-body pb-1 mb-0 small border-bottom border-gray" style="margin-left: 5px">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<a th:text="${blog.getTitle()}"
|
<a th:href="@{'/blog/read/'+${blog.getBid()}}"
|
||||||
th:href="@{'/blog/read/'+${blog.getBid()}}"
|
|
||||||
class="text-dark font-weight-bold text-decoration-none d-block">
|
class="text-dark font-weight-bold text-decoration-none d-block">
|
||||||
|
<span th:class="${blog.getCategoryId()==1?'badge badge-pill badge-danger':'badge badge-pill badge-primary'}" th:text="${blog.getCategoryName()}"></span>
|
||||||
|
[[${blog.getTitle()}]]
|
||||||
</a>
|
</a>
|
||||||
<!-- 浏览量 -->
|
<!-- 浏览量 -->
|
||||||
<span class="badge badge-success">
|
<span>
|
||||||
<svg class="bi bi-eye-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
<svg class="bi bi-eye-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
|
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
|
||||||
<path fill-rule="evenodd" d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
|
<path fill-rule="evenodd" d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user