angularjs mobile v0.1

This commit is contained in:
life
2014-05-14 22:23:35 +08:00
parent 88ad35e9be
commit ab5e5c7b76
103 changed files with 12466 additions and 9 deletions

View File

@ -33,7 +33,7 @@ func (c Mobile) Index() revel.Result {
c.RenderArgs["sharedUserInfos"] = c.Json(sharedUserInfos)
c.RenderArgs["tagsJson"] = c.Json(tagService.GetTags(c.GetUserId()))
return c.RenderTemplate("mobile/index.html");
return c.RenderTemplate("mobile/angular.html");
}
func (c Mobile) Logout() revel.Result {

View File

@ -85,6 +85,11 @@ func (c Note) ListTrashNotes() revel.Result {
return c.RenderJson(notes)
}
// 得到note和内容
func (c Note) GetNoteAndContent(noteId string) revel.Result {
return c.RenderJson(noteService.GetNoteAndContent(noteId, c.GetUserId()))
}
// 得到内容
func (c Note) GetNoteContent(noteId string) revel.Result {
noteContent := noteService.GetNoteContent(noteId, c.GetUserId())

View File

@ -13,17 +13,12 @@ type Notebook struct {
BaseController
}
// 得到笔记本
// 该用户下的
func (c Notebook) GetNotebooks() {
}
func (c Notebook) Index(notebook info.Notebook, i int, name string) revel.Result {
return c.RenderJson(notebook)
}
// 得到用户的所有笔记本
func (c Notebook) getNotebooks() revel.Result {
func (c Notebook) GetNotebooks() revel.Result {
re := notebookService.GetNotebooks(c.GetUserId())
return c.RenderJson(re)
}