增加备案信息选项

This commit is contained in:
Minho
2018-03-19 17:46:47 +08:00
parent 57d47896c7
commit 52f5a44691
8 changed files with 52 additions and 39 deletions

View File

@@ -503,6 +503,7 @@ func (c *BookController) Create() {
}
c.JsonResult(6001, "error")
}
//导入
func (c *BookController) Import() {
@@ -515,6 +516,12 @@ func (c *BookController) Import() {
beego.Info(moreFile.Filename)
ext := filepath.Ext(moreFile.Filename)
if !strings.EqualFold(ext,".doc") || !strings.EqualFold(ext,".docx") {
c.JsonResult(6004,"不支持的文件类型")
}
tempPath := filepath.Join(os.TempDir(),c.CruSession.SessionID())
os.MkdirAll(tempPath,0766)
@@ -525,7 +532,6 @@ func (c *BookController) Import() {
converter.Resolve(tempPath)
}
// CreateToken 创建访问来令牌.

View File

@@ -435,7 +435,7 @@ func (c *ManagerController) Setting() {
c.Data["SITE_TITLE"] = c.Option["SITE_NAME"]
for _, item := range options {
c.Data[item.OptionName] = item
c.Data[item.OptionName] = item.OptionValue
}
}