Пример #1
0
//首页
func (c *User) Index(user *models.User) revel.Result {
	title := "会员首页--GoCMS管理系统"

	var page string = c.Params.Get("page")
	var search string = c.Params.Get("search")

	var Page int64 = 1

	if len(page) > 0 {
		Page, _ = strconv.ParseInt(page, 10, 64)
	}

	user_list, pages, where := user.GetUserList(search, Page, 10)

	//会员组
	user_group := new(models.User_Group)
	group_list := user_group.GetGroupList()

	c.Render(title, user_list, group_list, pages, where)
	return c.RenderTemplate("User/Manage/Index.html")
}