1、实现富文本编辑器

2、实现文档转换为PDF、MOBI、EPUB、Word格式
3、实现登录后跳转到来源地址
This commit is contained in:
Minho
2018-01-26 17:17:38 +08:00
parent e1ec6bb788
commit 882d93e7b0
57 changed files with 1572 additions and 1475 deletions

View File

@@ -4,11 +4,11 @@ import "github.com/astaxie/beego/orm"
type CommentResult struct {
Comment
Author string `json:"author"`
ReplyAccount string `json:"reply_account"`
Author string `json:"author"`
ReplyAccount string `json:"reply_account"`
}
func (m *CommentResult) FindForDocumentToPager(doc_id, page_index,page_size int) (comments []*CommentResult,totalCount int,err error) {
func (m *CommentResult) FindForDocumentToPager(doc_id, page_index, page_size int) (comments []*CommentResult, totalCount int, err error) {
o := orm.NewOrm()
@@ -25,12 +25,11 @@ FROM md_comments AS comment
WHERE comment.document_id = ? ORDER BY comment.comment_id DESC LIMIT 0,10`
offset := (page_index - 1) * page_size
_,err = o.Raw(sql1,doc_id,offset, page_size).QueryRows(&comments)
_, err = o.Raw(sql1, doc_id, offset, page_size).QueryRows(&comments)
v,err := o.QueryTable(m.TableNameWithPrefix()).Filter("document_id",doc_id).Count()
v, err := o.QueryTable(m.TableNameWithPrefix()).Filter("document_id", doc_id).Count()
if err == nil {
totalCount = int(v)
@@ -38,4 +37,3 @@ WHERE comment.document_id = ? ORDER BY comment.comment_id DESC LIMIT 0,10`
return
}