diff --git a/app/controllers/admin/AdminSettingController.go b/app/controllers/admin/AdminSettingController.go index abda4b9..7a68416 100644 --- a/app/controllers/admin/AdminSettingController.go +++ b/app/controllers/admin/AdminSettingController.go @@ -73,15 +73,9 @@ func (c AdminSetting) DoDemo(demoUsername, demoPassword string) revel.Result { return c.RenderJson(re) } -// ToImage -// 长微博的bin路径phantomJs -func (c AdminSetting) ToImage() revel.Result { - c.RenderArgs["toImageBinPath"] = configService.GetGlobalStringConfig("toImageBinPath") - return c.RenderTemplate("admin/setting/toImage.html"); -} -func (c AdminSetting) DoToImage(toImageBinPath string) revel.Result { +func (c AdminSetting) ExportPdf(path string) revel.Result { re := info.NewRe() - re.Ok = configService.UpdateGlobalStringConfig(c.GetUserId(), "toImageBinPath", toImageBinPath) + re.Ok = configService.UpdateGlobalStringConfig(c.GetUserId(), "exportPdfBinPath", path) return c.RenderJson(re) } diff --git a/app/controllers/api/ApiNoteController.go b/app/controllers/api/ApiNoteController.go index e1b8e16..be344fa 100644 --- a/app/controllers/api/ApiNoteController.go +++ b/app/controllers/api/ApiNoteController.go @@ -585,6 +585,7 @@ func (c ApiNote) GetHistories(noteId string) revel.Result { // 0.2 新增 // 导出成PDF +// test localhost:9000/api/note/exportPdf?noteId=554f07bf05fcd15fa9000000&token=562211dc99c37ba6a7000001 func (c ApiNote) ExportPdf(noteId string) revel.Result { re := info.NewApiRe() userId := c.getUserId() diff --git a/app/views/admin/nav.html b/app/views/admin/nav.html index e2f2ffa..2b44c0a 100644 --- a/app/views/admin/nav.html +++ b/app/views/admin/nav.html @@ -13,7 +13,6 @@ -