增加操作日志查看界面

This commit is contained in:
GoEdgeLab
2020-11-10 20:30:47 +08:00
parent 32f8ba02b6
commit d088e88e58
13 changed files with 101 additions and 47 deletions

View File

@@ -2,9 +2,9 @@ package helpers
import (
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/utils/numberutils"
"github.com/iwind/TeaGo/actions"
"net/http"
"strconv"
)
type UserShouldAuth struct {
@@ -25,7 +25,7 @@ func (this *UserShouldAuth) BeforeAction(actionPtr actions.ActionWrapper, paramN
}
// 存储用户名到SESSION
func (this *UserShouldAuth) StoreAdmin(adminId int, remember bool) {
func (this *UserShouldAuth) StoreAdmin(adminId int64, remember bool) {
// 修改sid的时间
if remember {
cookie := &http.Cookie{
@@ -54,7 +54,7 @@ func (this *UserShouldAuth) StoreAdmin(adminId int, remember bool) {
}
this.action.AddCookie(cookie)
}
this.action.Session().Write("adminId", strconv.Itoa(adminId))
this.action.Session().Write("adminId", numberutils.FormatInt64(adminId))
}
func (this *UserShouldAuth) IsUser() bool {