Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 580829d

Browse files
committed
提示领取铜币
1 parent b34118b commit 580829d

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

config/db.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ CREATE TABLE IF NOT EXISTS `articles` (
310310
PRIMARY KEY (`id`),
311311
UNIQUE KEY (`url`),
312312
KEY (`top`),
313+
KEY (`author_txt`),
313314
KEY (`domain`),
314315
KEY (`ctime`)
315316
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '网络文章聚合表';

static/js/comment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
$('.comment-list .words .reply').removeClass('light');
258258
}, 2000);
259259
callback();
260-
}else{
260+
} else {
261261
alert(data.error);
262262
}
263263
},

template/common/layout.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@
126126
您的账号未激活,不允许发布内容。<a href="/account/edit" class="alert-link">现在就去激活</a>
127127
</div>
128128
</div>
129+
{{else if eq .me.Balance 0}}
130+
<div class="row">
131+
<div class="alert alert-warning text-center" role="alert" style="margin-bottom: 0px;">
132+
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
133+
您的账号铜币不足,不允许发布内容,可 <a href="/balance" class="alert-link">领取</a> 初始资本,或去 <a href="/balance/add" class="alert-link">充值</a>
134+
</div>
135+
</div>
129136
{{end}}
130137
{{end}}
131138

template/new_index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747
{{if eq .Objtype 0}}
4848
<a class="node" href="/go/{{.Node.ename}}">{{.Node.name}}</a>
4949
{{else if eq .Objtype 1}}
50-
<a class="node" href="/articles">文章</a>
50+
{{if .Tags}}
51+
{{$tags := explode .Tags ","}}
52+
<a class="node" href="/tag/{{index $tags 0}}">{{index $tags 0}}</a>
53+
{{else}}
54+
<a class="node" href="/articles">文章</a>
55+
{{end}}
5156
{{else if eq .Objtype 2}}
5257
<a class="node" href="/resources/cat/{{.Nid}}">{{.Node.name}}</a>
5358
{{else if eq .Objtype 3}}

0 commit comments

Comments
 (0)