Skip to content

Commit

Permalink
修复清理缓存bug,优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
www committed Sep 16, 2021
1 parent 0369c7c commit fa0e2c2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions admin/controller/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Article extends Base

this.$assign('cate_list', cate_list);
this.$assign('article', article);
this.$assign('uname', this.user.uname);

const is_comment_option = [
{value: 0, name: '默认'},
Expand Down
4 changes: 2 additions & 2 deletions admin/view/article_form.htm
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
<div class="layui-form-item">
<label class="layui-form-label">作者</label>
<div class="layui-input-block">
<input type="text" name="writer" class="layui-input" value="{{article.writer || '雨思'}}">
<input type="text" name="writer" class="layui-input" value="{{article.writer || uname}}">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">来源</label>
<div class="layui-input-block">
<input type="text" name="source" class="layui-input" value="{{article.source || 'me'}}">
<input type="text" name="source" class="layui-input" value="{{article.source || site.webname}}">
</div>
</div>
<div class="layui-form-item">
Expand Down
2 changes: 1 addition & 1 deletion admin/view/site_index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ul class="layui-tab-title">
<li class="layui-this">站点设置</li>
<li>其他</li>
<li>自定义</li>
<li style="display: none;">自定义</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/yafoo/melog#readme",
"dependencies": {
"jimp": "^0.16.1",
"jj.js": "^0.7.0",
"jj.js": "^0.7.1",
"markdown-it": "^12.2.0"
}
}
2 changes: 1 addition & 1 deletion public/static/melog.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $(function() {

$.post($form.attr("action"), data, function(re){
if(re.state) {
tips(re.msg, 3000, function(){
tips(re.msg, 2000, function(){
history.go(0);
});
} else {
Expand Down

0 comments on commit fa0e2c2

Please sign in to comment.