angularjs mobile v0.1
This commit is contained in:
@ -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 {
|
||||
|
@ -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())
|
||||
|
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user