1、增加访问数量
2、主页的样式修改 3、头像自定义实现 4、注册修改为自动跳转到登录页面,登录失败友好提示,不进行跳转页面处理 5、博客增加私密的功能
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<div class="col-md-12 order-md-1">
|
||||
<h4 class="mb-3">发布文章</h4>
|
||||
|
||||
<form class="needs-validation" th:action="@{/blog/write}" method="post">
|
||||
<form id="editForm" class="needs-validation" th:action="@{/blog/write}" method="post">
|
||||
<!-- 隐藏域 -->
|
||||
<input type="hidden" name="authorId" th:value="${session.loginUser.getUid()}">
|
||||
<input type="hidden" name="authorName" th:value="${session.loginUser.getUsername()}">
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 mb-3">
|
||||
<label for="categoryId">文章标签</label>
|
||||
<label for="categoryId">权限</label>
|
||||
<select name="categoryId" class="custom-select d-block w-100" id="categoryId" required>
|
||||
<option th:each="category:${categoryList}"
|
||||
th:value="${category.getId()}" th:text="${category.getCategory()}">
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary btn-lg btn-block" type="submit" onclick="talkWith()" >发布文章</button>
|
||||
<button class="btn btn-primary btn-lg btn-block" type="button" onclick="talkWith()" >发布文章</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,12 +93,13 @@
|
||||
layer.open({ content: '请选择博客分类', skin: 'msg', time: 2 });
|
||||
return;
|
||||
}
|
||||
console.log(content.length < 30);
|
||||
if (content.length < 30){
|
||||
layer.open({ content: '内容过短!请多表达一点思想吧?', skin: 'msg', time: 2 });
|
||||
return;
|
||||
}
|
||||
this.disabled = true;
|
||||
this.submit();
|
||||
$('#editForm').submit();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user