huangjiajun 6 일 전
부모
커밋
6a2aa94d75
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. +6
    -1
      app/operator/svc/svc_login.go

+ 6
- 1
app/operator/svc/svc_login.go 파일 보기

@@ -45,8 +45,13 @@ func Login(c *gin.Context) {
}
key := fmt.Sprintf("%s:token:%s", c.GetString("mid"), user.Username)
cache.SetEx(key, token, 39528000) // 半年
res := map[string]string{
role := []string{"comm"}
if user.Level == 3 {
role = append(role, "operator")
}
res := map[string]interface{}{
"token": token,
"role": role,
}
e.OutSuc(c, res, nil)
return


불러오는 중...
취소
저장