mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-21 19:29:53 +08:00
搭建框架
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import "strings"
|
||||
|
||||
type BookController struct {
|
||||
BaseController
|
||||
}
|
||||
@@ -22,8 +24,17 @@ func (p *BookController) Users() {
|
||||
p.TplName = "book/users.tpl"
|
||||
}
|
||||
|
||||
func (p *BookController) Create() {
|
||||
p.TplName = "book/create.tpl"
|
||||
func (c *BookController) Create() {
|
||||
|
||||
if c.Ctx.Input.IsPost() {
|
||||
book_name := strings.TrimSpace(c.GetString("book_name",""))
|
||||
identify := strings.TrimSpace(c.GetString("identify",""))
|
||||
description := strings.TrimSpace(c.GetString("description",""))
|
||||
privately_owned := c.GetString("privately_owned")
|
||||
comment_status := c.GetString("comment_status")
|
||||
|
||||
}
|
||||
c.JsonResult(6001,"error")
|
||||
}
|
||||
|
||||
// Edit 编辑项目.
|
||||
|
||||
Reference in New Issue
Block a user