diff --git a/conf/lang/en-us.ini b/conf/lang/en-us.ini index da7b302f..d432887f 100644 --- a/conf/lang/en-us.ini +++ b/conf/lang/en-us.ini @@ -63,4 +63,8 @@ account_existed = Username already existed failed_register = Registration failed, please contact the system administrator failed_obtain_user_info = Failed to obtain identity information dingtalk_auto_login_not_enable = DingTalk automatic login function is not enabled -failed_auto_login = Automatic login failed \ No newline at end of file +failed_auto_login = Automatic login failed +no_project = No Project + +[blog] +author = author \ No newline at end of file diff --git a/conf/lang/zh-cn.ini b/conf/lang/zh-cn.ini index 25b2832b..31c15257 100644 --- a/conf/lang/zh-cn.ini +++ b/conf/lang/zh-cn.ini @@ -63,4 +63,8 @@ account_existed = 账号已存在 failed_register = 注册失败,请联系管理员 failed_obtain_user_info = 获取身份信息失败 dingtalk_auto_login_not_enable = 未开启钉钉自动登录功能 -failed_auto_login = 自动登录失败 \ No newline at end of file +failed_auto_login = 自动登录失败 +no_project = 暂无项目 + +[blog] +author = 作者 \ No newline at end of file diff --git a/controllers/HomeController.go b/controllers/HomeController.go index e4c6f145..00521a67 100644 --- a/controllers/HomeController.go +++ b/controllers/HomeController.go @@ -28,14 +28,11 @@ func (c *HomeController) Index() { pageIndex, _ := c.GetInt("page", 1) pageSize := 18 - memberId := 0 - if c.Member != nil { memberId = c.Member.MemberId } books, totalCount, err := models.NewBook().FindForHomeToPager(pageIndex, pageSize, memberId) - if err != nil { logs.Error(err) c.Abort("500") @@ -47,6 +44,5 @@ func (c *HomeController) Index() { c.Data["PageHtml"] = "" } c.Data["TotalPages"] = int(math.Ceil(float64(totalCount) / float64(pageSize))) - c.Data["Lists"] = books } diff --git a/views/home/index.tpl b/views/home/index.tpl index 9b634493..982b6d7a 100644 --- a/views/home/index.tpl +++ b/views/home/index.tpl @@ -35,7 +35,7 @@