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

Skip to content

Commit c914eee

Browse files
committed
评论单独页,内容删除 bugfix
1 parent d24d02e commit c914eee

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

logic/article.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ func (self ArticleLogic) FindByIds(ids []int) []*model.Article {
718718
return nil
719719
}
720720
articles := make([]*model.Article, 0)
721-
err := MasterDB.In("id", ids).Find(&articles)
721+
err := MasterDB.In("id", ids).Where("status<=?", model.ArticleStatusOnline).Find(&articles)
722722
if err != nil {
723723
logger.Errorln("ArticleLogic FindByIds error:", err)
724724
return nil

logic/topic.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ func (self TopicLogic) FindFullinfoByTids(tids []int) []map[string]interface{} {
385385
topicInfos := make([]*model.TopicInfo, 0, len(topicInfoMap))
386386
for _, tid := range tids {
387387
if topicInfo, ok := topicInfoMap[tid]; ok {
388+
if topicInfo.Flag > model.FlagNormal {
389+
continue
390+
}
388391
topicInfos = append(topicInfos, topicInfo)
389392
}
390393
}

template/markdown.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ <h1 style="text-align: center;">Markdown 教程</h1>
5959
```
6060
![alt 文本](http://image-path.png)
6161
![alt 文本](http://image-path.png &quot;图片 Title 值&quot;)
62-
![设置图片宽度高度](http://image-path.png =300x200)
63-
![设置图片宽度](http://image-path.png =300x)
64-
![设置图片高度](http://image-path.png =x200)
6562
```
6663

6764
### 代码块
@@ -116,13 +113,13 @@ <h1 style="text-align: center;">Markdown 教程</h1>
116113
#### 有序列表
117114

118115
1. Go
119-
1. Gofmt
120-
2. Revel
121-
3. Gin
122-
4. Echo
116+
1. Gofmt
117+
2. Revel
118+
3. Gin
119+
4. Echo
123120
2. PHP
124-
1. Laravel
125-
2. ThinkPHP
121+
1. Laravel
122+
2. ThinkPHP
126123
3. Java
127124

128125
### 表格
@@ -287,4 +284,4 @@ <h3 id="表格">表格</h3>
287284

288285
{{define "js"}}
289286
{{include "cssjs/prism.js.html" .}}
290-
{{end}}
287+
{{end}}

0 commit comments

Comments
 (0)