fix 优化了登录的记住密码描述,

修改了个人中心的样式。优化了编辑栏位
This commit is contained in:
limqhz
2022-05-17 14:50:16 +08:00
parent e2bd4c5084
commit 95a23b572b
14 changed files with 31 additions and 27 deletions

View File

@@ -58,7 +58,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// http.requiresChannel().anyRequest().requiresSecure();
// 记住我配置 默认为remember-me
http.rememberMe();
http.rememberMe().tokenValiditySeconds(604800);
}
// 用户授权验证

View File

@@ -57,13 +57,14 @@ public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements Bl
}
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.setBid(blogRead.getBid());
if (!QuinnConstant.SESSION_VIEW_KEY.equals(value)){
blog.setViews(blogRead.getViews()+1);
redisUtils.set(sessionId + blog.getBid(),QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
updateById(blog);
blogRead.setViews(blogRead.getViews()+1);
redisUtils.set(sessionId + bid,QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
update(blog,new QueryWrapper<Blog>().eq("bid",bid));
}
}

View File

@@ -196,9 +196,12 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
*/
String value = redisUtils.get(sessionId + source.getSid());
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);
updateById(source);
// 不更新大字段
updateById(update);
}
}

View File

@@ -1,6 +1,6 @@
/* 如果使用该初始化方法请一定要在html放三个标签或者直接看代码修改内容
* <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>
* 另外此方法依赖layer.js & axios.js 做遮罩弹框,
* 也可以重写 uploadImage:onFailed | onError 自定义提示
@@ -13,7 +13,7 @@ E.i18nChangeLanguage(LANG)
const editorConfig = {
placeholder: '请输入...',
scroll: true, // 禁止编辑器滚动
scroll: false, // 禁止编辑器滚动
MENU_CONF: {
uploadImage: {
fieldName: 'your-fileName',

View File

@@ -1,6 +1,6 @@
/* 如果使用该初始化方法请一定要在html放三个标签或者直接看代码修改内容
* <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>
* 另外此方法依赖layer.js & axios.js 做遮罩弹框,
* 也可以重写 uploadImage:onFailed | onError 自定义提示
@@ -14,7 +14,7 @@ E.i18nChangeLanguage(LANG)
const editorConfig = {
placeholder: '',
readOnly: true,
scroll: true, // 禁止编辑器滚动
scroll: false, // 禁止编辑器滚动
}
// 先创建 editor

View File

@@ -50,7 +50,7 @@
<p>论坛详情</p>
<div id="blog-content">
<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="contentText-textarea" name="contentJson" style="display: none;"></textarea>
</div>

View File

@@ -96,7 +96,7 @@
<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>
</div>

View File

@@ -50,7 +50,7 @@
<p>文章内容</p>
<div id="blog-content">
<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="contentText-textarea" name="contentJson" style="display: none;"></textarea>
</div>

View File

@@ -27,7 +27,7 @@
</div>
<div class="checkbox float-left mb-3">
<label>
<input type="checkbox" name="remember-me"> 记住密码
<input type="checkbox" name="remember-me"> 7天免登录
</label>
</div>
<button class="btn btn-dark btn-block" type="button" onclick="loginSubmit()">登 录</button>

View File

@@ -79,7 +79,7 @@
<hr/>
<div id="blog-content">
<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="contentText-textarea" name="contentJson" style="display: none;"></textarea>
</div>

View File

@@ -8,7 +8,7 @@
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
<style>
#maxLength {
max-width: 500px;
max-width: 320px;
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 超出部分不显示 */
text-overflow: ellipsis; /* 超出部分显示为... */
@@ -33,14 +33,13 @@
<!-- 标题 -->
<a th:href="@{'/source/view/'+${source.getSid()}}"
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>
[[${source.getSourceName()}]]
</a>
<!-- 收藏 -->
<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>
<p class="float-right" th:text="${#dates.format(source.getGmtUpdate(),'yyyy-MM-dd')}"></p>
<div class="small">
<span id="maxLength" th:text="${source.getDetail()}"
class="d-block">

View File

@@ -73,7 +73,7 @@
<hr/>
<div id="blog-content">
<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="contentText-textarea" name="contentJson" style="display: none;"></textarea>
</div>

View File

@@ -47,7 +47,7 @@
<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>
</div>

View File

@@ -58,12 +58,13 @@
<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">
<!-- 标题 -->
<a th:text="${blog.getTitle()}"
th:href="@{'/blog/read/'+${blog.getBid()}}"
<a th:href="@{'/blog/read/'+${blog.getBid()}}"
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>
<!-- 浏览量 -->
<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">
<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"/>