소스 검색

token验证接口

huwei 2 주 전
부모
커밋
290e902da9

+ 4 - 4
server/config/permissions.go

@@ -163,7 +163,7 @@ func IsSuperRole(roleId int64) bool {
 }
 
 // ValidityAuth 验证权限
-func ValidityAuth(roleId int64, method, path string, systemId int32) (err error) {
+func ValidityAuth(roleId int64, method, path string) (err error) {
 	path = strings.TrimPrefix(path, "/entrance")
 	// 超管无需验证
 	if IsSuperRole(roleId) {
@@ -205,7 +205,7 @@ func ValidityAuth(roleId int64, method, path string, systemId int32) (err error)
 	//if err != nil {
 	//	return fmt.Errorf("权限解析时发生错误:%v,请联系管理员", err.Error())
 	//}
-	permissionList, err := GetRoleSystemPermissions(roleId, int64(systemId))
+	permissionList, err := GetRoleSystemPermissions(roleId)
 	if err != nil {
 		return fmt.Errorf("获取角色权限错误:%v,请联系管理员", err.Error())
 	}
@@ -272,11 +272,11 @@ func GetAllPermissions() ([]*Permission, error) {
 }
 
 // GetRoleSystemPermissions 获取角色下的权限
-func GetRoleSystemPermissions(roleId, systemId int64) ([]*model.AdminOperation, error) {
+func GetRoleSystemPermissions(roleId int64) ([]*model.AdminOperation, error) {
 	rpq := query.Use(AdminDB).AdminRolePermission
 	oq := query.Use(AdminDB).AdminOperation
 	pIds := make([]int32, 0)
-	err := rpq.Where(rpq.RoleID.Eq(int32(roleId)), rpq.SystemID.Eq(int32(systemId))).Pluck(rpq.PermissionID, &pIds)
+	err := rpq.Where(rpq.RoleID.Eq(int32(roleId))).Pluck(rpq.PermissionID, &pIds)
 	if err != nil {
 		return nil, err
 	}

+ 98 - 0
server/internal/admin/api/admin_user.go

@@ -2,11 +2,19 @@ package api
 
 import (
 	"context"
+	"encoding/base64"
 	"entrance-grpc/iam"
+	"gadmin/config"
+	"gadmin/internal/admin/consts"
 	"gadmin/internal/admin/forms"
 	"gadmin/internal/admin/service"
 	"gadmin/utility/serializer"
+	"gadmin/utility/token"
 	"github.com/gin-gonic/gin"
+	jsoniter "github.com/json-iterator/go"
+	"github.com/sirupsen/logrus"
+	"strconv"
+	"time"
 )
 
 func UserLogin(c *gin.Context) {
@@ -20,6 +28,29 @@ func UserLogin(c *gin.Context) {
 	}
 }
 
+func UserLogout(c *gin.Context) {
+	encodeToken := token.GetAuthorization(c)
+	if encodeToken == "" {
+		c.JSON(200, serializer.CheckLogin())
+		return
+	}
+	bytesT, err := base64.URLEncoding.DecodeString(encodeToken)
+	if err != nil {
+		logrus.Warningf("middleware base64.URLEncoding.DecodeString:%+v", err.Error())
+		c.JSON(200, serializer.CheckLogin())
+		return
+	}
+	t := string(bytesT)
+
+	err = service.User.Logout(t)
+	if err != nil {
+		logrus.Warningf("middleware UserLogout:%+v", err.Error())
+		c.JSON(200, serializer.CheckLogin())
+		return
+	}
+	c.JSON(200, serializer.Suc(nil, "退出成功"))
+}
+
 //func UserMe(c *gin.Context) {
 //	var (
 //		user = token.CurrentUser(c)
@@ -117,6 +148,62 @@ type AdminIamServer struct {
 	iam.UnimplementedIamServer
 }
 
+func (s *AdminIamServer) CheckToken(ctx context.Context, req *iam.CheckTokenReq) (*iam.CheckTokenResp, error) {
+	resp := &iam.CheckTokenResp{}
+	tokenKey := config.GetTokenKey(req.GetToken())
+	if config.TokenRedis.Exists(tokenKey).Val() == 0 {
+		resp.Code = consts.CodeCheckLogin
+		resp.Msg = "未登录"
+		return resp, nil
+	}
+	userStr := config.TokenRedis.Get(tokenKey).Val()
+
+	user := new(token.UserClaims)
+	if err := jsoniter.UnmarshalFromString(userStr, user); err != nil {
+		logrus.Warningf("middleware jsoniter.UnmarshalFromString:%+v", err.Error())
+		resp.Code = consts.CodeCheckLogin
+		resp.Msg = "未登录"
+		return resp, nil
+	}
+	if user.ID == 0 {
+		resp.Code = consts.CodeCheckLogin
+		resp.Msg = "未登录"
+		return resp, nil
+	}
+
+	// 查询登录token是否有效
+	now := time.Now()
+	key := config.GetUserTokenKey(user.ID)
+	tokenCTStr := config.TokenRedis.HGet(key, req.GetToken()).Val()
+	tokenCreateTime, err := strconv.Atoi(tokenCTStr)
+	if err != nil {
+		logrus.Warningf("middleware config.LogRedis.HGet:%+v", err.Error())
+		resp.Code = consts.CodeCheckLogin
+		resp.Msg = "未登录"
+		return resp, nil
+	}
+	tokenCT := time.Unix(int64(tokenCreateTime), 0)
+
+	if tokenCT.Before(now.Add(-config.TokenExpireTime)) {
+		config.TokenRedis.HDel(key, req.GetToken())
+		resp.Code = consts.CodeCheckLogin
+		resp.Msg = "未登录"
+		return resp, nil
+	}
+	config.TokenRedis.HSet(key, req.GetToken(), now.Unix())
+	config.TokenRedis.Expire(key, time.Hour*12)
+	config.TokenRedis.Expire(tokenKey, time.Hour*12)
+
+	resp.Data = &iam.AdminUserInfo{
+		ID:       user.ID,
+		RoleID:   user.RoleId,
+		UserName: user.UserName,
+		NickName: user.Nickname,
+		Avatar:   user.Avatar,
+	}
+	return resp, nil
+}
+
 func (s *AdminIamServer) GetAdminUserByID(ctx context.Context, req *iam.GetAdminUserByIDReq) (*iam.GetAdminUserByIDResp, error) {
 	user, err := service.User.GetUserInfoByID(ctx, req.GetUID())
 	resp := &iam.GetAdminUserByIDResp{}
@@ -167,3 +254,14 @@ func (s *AdminIamServer) GetRoleSystems(ctx context.Context, req *iam.GetRoleSys
 	}
 	return resp, nil
 }
+
+func (s *AdminIamServer) DeleteToken(ctx context.Context, req *iam.DeleteTokenReq) (*iam.DeleteTokenResp, error) {
+	resp := &iam.DeleteTokenResp{}
+
+	err := service.User.Logout(req.GetToken())
+	if err != nil {
+		resp.Code = 1
+		resp.Msg = err.Error()
+	}
+	return resp, nil
+}

+ 1 - 6
server/internal/admin/middleware/permission.go

@@ -41,14 +41,9 @@ func Permission() gin.HandlerFunc {
 			c.Abort()
 			return
 		}
-		systemId := user.SystemId
-		/*if systemId <= 0 {
-			c.JSON(200, serializer.Err(consts.CodeNoPermission, "登陆失效", nil))
-			c.Abort()
-		}*/
 
 		if models.UserName != "mojun" {
-			if err := config.ValidityAuth(int64(models.RoleID), c.Request.Method, c.Request.URL.Path, systemId); err != nil {
+			if err := config.ValidityAuth(int64(models.RoleID), c.Request.Method, c.Request.URL.Path); err != nil {
 				c.JSON(200, serializer.Err(consts.CodeNoPermission, err.Error(), err))
 				c.Abort()
 				return

+ 1 - 0
server/internal/admin/server/router.go

@@ -48,6 +48,7 @@ func NewEngine() *gin.Engine {
 			checkToken.GET("service/list", api.ServiceList)                // 服务列表
 			checkToken.POST("service/select", api.ServiceSelect)           // 选择系统
 			checkToken.GET("user/checkRolePermission", api.RolePermission) // 管理员用户是否拥有权限管理
+			checkToken.GET("user/logout", api.UserLogout)                  // 管理员用户是退出登录
 		}
 
 		// 需要登录保护的

+ 26 - 0
server/internal/admin/service/admin_user.go

@@ -458,6 +458,7 @@ func (s *sUser) GetUserInfoByID(ctx context.Context, id int64) (*iam.AdminUserIn
 		UserName: user.UserName,
 		NickName: user.Nickname,
 		Status:   int64(user.Status),
+		Avatar:   user.Avatar,
 	}, nil
 }
 
@@ -478,6 +479,7 @@ func (s *sUser) BatchGetUsers(ctx context.Context, ids []int64) ([]*iam.AdminUse
 			UserName: v.UserName,
 			NickName: v.Nickname,
 			Status:   int64(v.Status),
+			Avatar:   v.Avatar,
 		})
 	}
 	return result, nil
@@ -498,6 +500,7 @@ func (s *sUser) GetUserByNickName(ctx context.Context, nickName string) (*iam.Ad
 		UserName: user.UserName,
 		NickName: user.Nickname,
 		Status:   int64(user.Status),
+		Avatar:   user.Avatar,
 	}, nil
 }
 
@@ -544,3 +547,26 @@ func (s *sUser) GetRoleSystems(ctx context.Context, roleId int64) ([]*iam.System
 	}
 	return services, nil
 }
+
+func (s *sUser) Logout(accessToken string) error {
+	tokenKey := config.GetTokenKey(accessToken)
+	if config.TokenRedis.Exists(tokenKey).Val() == 0 {
+		return nil
+	}
+	userStr := config.TokenRedis.Get(tokenKey).Val()
+
+	user := new(token.UserClaims)
+	if err := jsoniter.UnmarshalFromString(userStr, user); err != nil {
+		logrus.Warningf("middleware jsoniter.UnmarshalFromString:%+v", err.Error())
+		return err
+	}
+	if user.ID == 0 {
+		config.TokenRedis.Del(tokenKey)
+		return nil
+	}
+
+	key := config.GetUserTokenKey(user.ID)
+	config.TokenRedis.HDel(key, accessToken)
+	config.TokenRedis.Del(tokenKey)
+	return nil
+}

+ 347 - 102
server/package/entrance-grpc/iam/iam.pb.go

@@ -20,6 +20,210 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
+type CheckTokenReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
+}
+
+func (x *CheckTokenReq) Reset() {
+	*x = CheckTokenReq{}
+	mi := &file_proto_iam_proto_msgTypes[0]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckTokenReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckTokenReq) ProtoMessage() {}
+
+func (x *CheckTokenReq) ProtoReflect() protoreflect.Message {
+	mi := &file_proto_iam_proto_msgTypes[0]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckTokenReq.ProtoReflect.Descriptor instead.
+func (*CheckTokenReq) Descriptor() ([]byte, []int) {
+	return file_proto_iam_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CheckTokenReq) GetToken() string {
+	if x != nil {
+		return x.Token
+	}
+	return ""
+}
+
+type CheckTokenResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code int64          `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
+	Msg  string         `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"`
+	Data *AdminUserInfo `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
+}
+
+func (x *CheckTokenResp) Reset() {
+	*x = CheckTokenResp{}
+	mi := &file_proto_iam_proto_msgTypes[1]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckTokenResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckTokenResp) ProtoMessage() {}
+
+func (x *CheckTokenResp) ProtoReflect() protoreflect.Message {
+	mi := &file_proto_iam_proto_msgTypes[1]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckTokenResp.ProtoReflect.Descriptor instead.
+func (*CheckTokenResp) Descriptor() ([]byte, []int) {
+	return file_proto_iam_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CheckTokenResp) GetCode() int64 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *CheckTokenResp) GetMsg() string {
+	if x != nil {
+		return x.Msg
+	}
+	return ""
+}
+
+func (x *CheckTokenResp) GetData() *AdminUserInfo {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type DeleteTokenReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
+}
+
+func (x *DeleteTokenReq) Reset() {
+	*x = DeleteTokenReq{}
+	mi := &file_proto_iam_proto_msgTypes[2]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *DeleteTokenReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteTokenReq) ProtoMessage() {}
+
+func (x *DeleteTokenReq) ProtoReflect() protoreflect.Message {
+	mi := &file_proto_iam_proto_msgTypes[2]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteTokenReq.ProtoReflect.Descriptor instead.
+func (*DeleteTokenReq) Descriptor() ([]byte, []int) {
+	return file_proto_iam_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DeleteTokenReq) GetToken() string {
+	if x != nil {
+		return x.Token
+	}
+	return ""
+}
+
+type DeleteTokenResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code int64  `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
+	Msg  string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"`
+}
+
+func (x *DeleteTokenResp) Reset() {
+	*x = DeleteTokenResp{}
+	mi := &file_proto_iam_proto_msgTypes[3]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *DeleteTokenResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteTokenResp) ProtoMessage() {}
+
+func (x *DeleteTokenResp) ProtoReflect() protoreflect.Message {
+	mi := &file_proto_iam_proto_msgTypes[3]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteTokenResp.ProtoReflect.Descriptor instead.
+func (*DeleteTokenResp) Descriptor() ([]byte, []int) {
+	return file_proto_iam_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *DeleteTokenResp) GetCode() int64 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *DeleteTokenResp) GetMsg() string {
+	if x != nil {
+		return x.Msg
+	}
+	return ""
+}
+
 type GetAdminUserByIDReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -30,7 +234,7 @@ type GetAdminUserByIDReq struct {
 
 func (x *GetAdminUserByIDReq) Reset() {
 	*x = GetAdminUserByIDReq{}
-	mi := &file_proto_iam_proto_msgTypes[0]
+	mi := &file_proto_iam_proto_msgTypes[4]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -42,7 +246,7 @@ func (x *GetAdminUserByIDReq) String() string {
 func (*GetAdminUserByIDReq) ProtoMessage() {}
 
 func (x *GetAdminUserByIDReq) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[0]
+	mi := &file_proto_iam_proto_msgTypes[4]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -55,7 +259,7 @@ func (x *GetAdminUserByIDReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use GetAdminUserByIDReq.ProtoReflect.Descriptor instead.
 func (*GetAdminUserByIDReq) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{0}
+	return file_proto_iam_proto_rawDescGZIP(), []int{4}
 }
 
 func (x *GetAdminUserByIDReq) GetUID() int64 {
@@ -77,7 +281,7 @@ type GetAdminUserByIDResp struct {
 
 func (x *GetAdminUserByIDResp) Reset() {
 	*x = GetAdminUserByIDResp{}
-	mi := &file_proto_iam_proto_msgTypes[1]
+	mi := &file_proto_iam_proto_msgTypes[5]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -89,7 +293,7 @@ func (x *GetAdminUserByIDResp) String() string {
 func (*GetAdminUserByIDResp) ProtoMessage() {}
 
 func (x *GetAdminUserByIDResp) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[1]
+	mi := &file_proto_iam_proto_msgTypes[5]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -102,7 +306,7 @@ func (x *GetAdminUserByIDResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use GetAdminUserByIDResp.ProtoReflect.Descriptor instead.
 func (*GetAdminUserByIDResp) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{1}
+	return file_proto_iam_proto_rawDescGZIP(), []int{5}
 }
 
 func (x *GetAdminUserByIDResp) GetCode() int64 {
@@ -136,7 +340,7 @@ type BatchGetAdminUserReq struct {
 
 func (x *BatchGetAdminUserReq) Reset() {
 	*x = BatchGetAdminUserReq{}
-	mi := &file_proto_iam_proto_msgTypes[2]
+	mi := &file_proto_iam_proto_msgTypes[6]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -148,7 +352,7 @@ func (x *BatchGetAdminUserReq) String() string {
 func (*BatchGetAdminUserReq) ProtoMessage() {}
 
 func (x *BatchGetAdminUserReq) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[2]
+	mi := &file_proto_iam_proto_msgTypes[6]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -161,7 +365,7 @@ func (x *BatchGetAdminUserReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use BatchGetAdminUserReq.ProtoReflect.Descriptor instead.
 func (*BatchGetAdminUserReq) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{2}
+	return file_proto_iam_proto_rawDescGZIP(), []int{6}
 }
 
 func (x *BatchGetAdminUserReq) GetUIds() []int64 {
@@ -181,11 +385,12 @@ type AdminUserInfo struct {
 	UserName string `protobuf:"bytes,3,opt,name=UserName,proto3" json:"UserName,omitempty"`
 	NickName string `protobuf:"bytes,4,opt,name=NickName,proto3" json:"NickName,omitempty"`
 	Status   int64  `protobuf:"varint,5,opt,name=Status,proto3" json:"Status,omitempty"`
+	Avatar   string `protobuf:"bytes,6,opt,name=Avatar,proto3" json:"Avatar,omitempty"`
 }
 
 func (x *AdminUserInfo) Reset() {
 	*x = AdminUserInfo{}
-	mi := &file_proto_iam_proto_msgTypes[3]
+	mi := &file_proto_iam_proto_msgTypes[7]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -197,7 +402,7 @@ func (x *AdminUserInfo) String() string {
 func (*AdminUserInfo) ProtoMessage() {}
 
 func (x *AdminUserInfo) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[3]
+	mi := &file_proto_iam_proto_msgTypes[7]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -210,7 +415,7 @@ func (x *AdminUserInfo) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use AdminUserInfo.ProtoReflect.Descriptor instead.
 func (*AdminUserInfo) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{3}
+	return file_proto_iam_proto_rawDescGZIP(), []int{7}
 }
 
 func (x *AdminUserInfo) GetID() int64 {
@@ -248,6 +453,13 @@ func (x *AdminUserInfo) GetStatus() int64 {
 	return 0
 }
 
+func (x *AdminUserInfo) GetAvatar() string {
+	if x != nil {
+		return x.Avatar
+	}
+	return ""
+}
+
 type BatchGetAdminUserResp struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -260,7 +472,7 @@ type BatchGetAdminUserResp struct {
 
 func (x *BatchGetAdminUserResp) Reset() {
 	*x = BatchGetAdminUserResp{}
-	mi := &file_proto_iam_proto_msgTypes[4]
+	mi := &file_proto_iam_proto_msgTypes[8]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -272,7 +484,7 @@ func (x *BatchGetAdminUserResp) String() string {
 func (*BatchGetAdminUserResp) ProtoMessage() {}
 
 func (x *BatchGetAdminUserResp) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[4]
+	mi := &file_proto_iam_proto_msgTypes[8]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -285,7 +497,7 @@ func (x *BatchGetAdminUserResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use BatchGetAdminUserResp.ProtoReflect.Descriptor instead.
 func (*BatchGetAdminUserResp) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{4}
+	return file_proto_iam_proto_rawDescGZIP(), []int{8}
 }
 
 func (x *BatchGetAdminUserResp) GetCode() int64 {
@@ -319,7 +531,7 @@ type GetAdminUserByNickNameReq struct {
 
 func (x *GetAdminUserByNickNameReq) Reset() {
 	*x = GetAdminUserByNickNameReq{}
-	mi := &file_proto_iam_proto_msgTypes[5]
+	mi := &file_proto_iam_proto_msgTypes[9]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -331,7 +543,7 @@ func (x *GetAdminUserByNickNameReq) String() string {
 func (*GetAdminUserByNickNameReq) ProtoMessage() {}
 
 func (x *GetAdminUserByNickNameReq) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[5]
+	mi := &file_proto_iam_proto_msgTypes[9]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -344,7 +556,7 @@ func (x *GetAdminUserByNickNameReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use GetAdminUserByNickNameReq.ProtoReflect.Descriptor instead.
 func (*GetAdminUserByNickNameReq) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{5}
+	return file_proto_iam_proto_rawDescGZIP(), []int{9}
 }
 
 func (x *GetAdminUserByNickNameReq) GetNickName() string {
@@ -366,7 +578,7 @@ type GetAdminUserByNickNameResp struct {
 
 func (x *GetAdminUserByNickNameResp) Reset() {
 	*x = GetAdminUserByNickNameResp{}
-	mi := &file_proto_iam_proto_msgTypes[6]
+	mi := &file_proto_iam_proto_msgTypes[10]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -378,7 +590,7 @@ func (x *GetAdminUserByNickNameResp) String() string {
 func (*GetAdminUserByNickNameResp) ProtoMessage() {}
 
 func (x *GetAdminUserByNickNameResp) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[6]
+	mi := &file_proto_iam_proto_msgTypes[10]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -391,7 +603,7 @@ func (x *GetAdminUserByNickNameResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use GetAdminUserByNickNameResp.ProtoReflect.Descriptor instead.
 func (*GetAdminUserByNickNameResp) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{6}
+	return file_proto_iam_proto_rawDescGZIP(), []int{10}
 }
 
 func (x *GetAdminUserByNickNameResp) GetCode() int64 {
@@ -425,7 +637,7 @@ type GetRoleSystemsReq struct {
 
 func (x *GetRoleSystemsReq) Reset() {
 	*x = GetRoleSystemsReq{}
-	mi := &file_proto_iam_proto_msgTypes[7]
+	mi := &file_proto_iam_proto_msgTypes[11]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -437,7 +649,7 @@ func (x *GetRoleSystemsReq) String() string {
 func (*GetRoleSystemsReq) ProtoMessage() {}
 
 func (x *GetRoleSystemsReq) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[7]
+	mi := &file_proto_iam_proto_msgTypes[11]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -450,7 +662,7 @@ func (x *GetRoleSystemsReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use GetRoleSystemsReq.ProtoReflect.Descriptor instead.
 func (*GetRoleSystemsReq) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{7}
+	return file_proto_iam_proto_rawDescGZIP(), []int{11}
 }
 
 func (x *GetRoleSystemsReq) GetRoleID() int64 {
@@ -472,7 +684,7 @@ type SystemInfo struct {
 
 func (x *SystemInfo) Reset() {
 	*x = SystemInfo{}
-	mi := &file_proto_iam_proto_msgTypes[8]
+	mi := &file_proto_iam_proto_msgTypes[12]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -484,7 +696,7 @@ func (x *SystemInfo) String() string {
 func (*SystemInfo) ProtoMessage() {}
 
 func (x *SystemInfo) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[8]
+	mi := &file_proto_iam_proto_msgTypes[12]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -497,7 +709,7 @@ func (x *SystemInfo) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use SystemInfo.ProtoReflect.Descriptor instead.
 func (*SystemInfo) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{8}
+	return file_proto_iam_proto_rawDescGZIP(), []int{12}
 }
 
 func (x *SystemInfo) GetID() int64 {
@@ -533,7 +745,7 @@ type GetRoleSystemsResp struct {
 
 func (x *GetRoleSystemsResp) Reset() {
 	*x = GetRoleSystemsResp{}
-	mi := &file_proto_iam_proto_msgTypes[9]
+	mi := &file_proto_iam_proto_msgTypes[13]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -545,7 +757,7 @@ func (x *GetRoleSystemsResp) String() string {
 func (*GetRoleSystemsResp) ProtoMessage() {}
 
 func (x *GetRoleSystemsResp) ProtoReflect() protoreflect.Message {
-	mi := &file_proto_iam_proto_msgTypes[9]
+	mi := &file_proto_iam_proto_msgTypes[13]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -558,7 +770,7 @@ func (x *GetRoleSystemsResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use GetRoleSystemsResp.ProtoReflect.Descriptor instead.
 func (*GetRoleSystemsResp) Descriptor() ([]byte, []int) {
-	return file_proto_iam_proto_rawDescGZIP(), []int{9}
+	return file_proto_iam_proto_rawDescGZIP(), []int{13}
 }
 
 func (x *GetRoleSystemsResp) GetCode() int64 {
@@ -586,27 +798,43 @@ var File_proto_iam_proto protoreflect.FileDescriptor
 
 var file_proto_iam_proto_rawDesc = []byte{
 	0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x12, 0x03, 0x69, 0x61, 0x6d, 0x22, 0x27, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d,
-	0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
-	0x03, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x49, 0x44, 0x22,
-	0x64, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42,
-	0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d,
-	0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a,
-	0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x61,
-	0x6d, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
-	0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x2a, 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65,
-	0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a,
-	0x04, 0x55, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x55, 0x49, 0x64,
-	0x73, 0x22, 0x87, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49,
-	0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x02, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x55,
-	0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55,
-	0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e,
-	0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e,
-	0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x65, 0x0a, 0x15, 0x42,
+	0x6f, 0x12, 0x03, 0x69, 0x61, 0x6d, 0x22, 0x25, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54,
+	0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5e, 0x0a,
+	0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43,
+	0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a,
+	0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12,
+	0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x37, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54,
+	0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03,
+	0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x27,
+	0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79,
+	0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x03, 0x55, 0x49, 0x44, 0x22, 0x64, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x64,
+	0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43,
+	0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x2a, 0x0a,
+	0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73,
+	0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20,
+	0x03, 0x28, 0x03, 0x52, 0x04, 0x55, 0x49, 0x64, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x0d, 0x41, 0x64,
+	0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49,
+	0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x52,
+	0x6f, 0x6c, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x6f, 0x6c,
+	0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+	0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53,
+	0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x65, 0x0a, 0x15, 0x42,
 	0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72,
 	0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
 	0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18,
@@ -636,28 +864,36 @@ var file_proto_iam_proto_rawDesc = []byte{
 	0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
 	0x03, 0x4d, 0x73, 0x67, 0x12, 0x23, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03,
 	0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49,
-	0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x32, 0xc0, 0x02, 0x0a, 0x03, 0x49, 0x61,
-	0x6d, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65,
-	0x72, 0x42, 0x79, 0x49, 0x44, 0x12, 0x18, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41,
-	0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a,
-	0x19, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73,
-	0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11,
-	0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65,
-	0x72, 0x12, 0x19, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74,
-	0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x69,
-	0x61, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e,
-	0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x16, 0x47, 0x65,
-	0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x69, 0x63, 0x6b,
-	0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64,
-	0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d,
-	0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64,
-	0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d,
-	0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x6f,
-	0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x2e, 0x69, 0x61, 0x6d, 0x2e,
-	0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65,
-	0x71, 0x1a, 0x17, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x53,
-	0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x07, 0x5a, 0x05,
-	0x2e, 0x2f, 0x69, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x32, 0xb5, 0x03, 0x0a, 0x03, 0x49, 0x61,
+	0x6d, 0x12, 0x37, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+	0x12, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+	0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54,
+	0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x44, 0x65,
+	0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x13, 0x2e, 0x69, 0x61, 0x6d, 0x2e,
+	0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14,
+	0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+	0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d,
+	0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x12, 0x18, 0x2e, 0x69, 0x61, 0x6d,
+	0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49,
+	0x44, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64,
+	0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x22,
+	0x00, 0x12, 0x4c, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d,
+	0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x42, 0x61, 0x74,
+	0x63, 0x68, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
+	0x71, 0x1a, 0x1a, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74,
+	0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
+	0x5b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42,
+	0x79, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x69, 0x61, 0x6d, 0x2e,
+	0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x69,
+	0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x69, 0x61, 0x6d, 0x2e,
+	0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x69,
+	0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e,
+	0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16,
+	0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
+	0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x47, 0x65, 0x74,
+	0x52, 0x6f, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22,
+	0x00, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x69, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (
@@ -672,37 +908,46 @@ func file_proto_iam_proto_rawDescGZIP() []byte {
 	return file_proto_iam_proto_rawDescData
 }
 
-var file_proto_iam_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_proto_iam_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
 var file_proto_iam_proto_goTypes = []any{
-	(*GetAdminUserByIDReq)(nil),        // 0: iam.GetAdminUserByIDReq
-	(*GetAdminUserByIDResp)(nil),       // 1: iam.GetAdminUserByIDResp
-	(*BatchGetAdminUserReq)(nil),       // 2: iam.BatchGetAdminUserReq
-	(*AdminUserInfo)(nil),              // 3: iam.AdminUserInfo
-	(*BatchGetAdminUserResp)(nil),      // 4: iam.BatchGetAdminUserResp
-	(*GetAdminUserByNickNameReq)(nil),  // 5: iam.GetAdminUserByNickNameReq
-	(*GetAdminUserByNickNameResp)(nil), // 6: iam.GetAdminUserByNickNameResp
-	(*GetRoleSystemsReq)(nil),          // 7: iam.GetRoleSystemsReq
-	(*SystemInfo)(nil),                 // 8: iam.SystemInfo
-	(*GetRoleSystemsResp)(nil),         // 9: iam.GetRoleSystemsResp
+	(*CheckTokenReq)(nil),              // 0: iam.CheckTokenReq
+	(*CheckTokenResp)(nil),             // 1: iam.CheckTokenResp
+	(*DeleteTokenReq)(nil),             // 2: iam.DeleteTokenReq
+	(*DeleteTokenResp)(nil),            // 3: iam.DeleteTokenResp
+	(*GetAdminUserByIDReq)(nil),        // 4: iam.GetAdminUserByIDReq
+	(*GetAdminUserByIDResp)(nil),       // 5: iam.GetAdminUserByIDResp
+	(*BatchGetAdminUserReq)(nil),       // 6: iam.BatchGetAdminUserReq
+	(*AdminUserInfo)(nil),              // 7: iam.AdminUserInfo
+	(*BatchGetAdminUserResp)(nil),      // 8: iam.BatchGetAdminUserResp
+	(*GetAdminUserByNickNameReq)(nil),  // 9: iam.GetAdminUserByNickNameReq
+	(*GetAdminUserByNickNameResp)(nil), // 10: iam.GetAdminUserByNickNameResp
+	(*GetRoleSystemsReq)(nil),          // 11: iam.GetRoleSystemsReq
+	(*SystemInfo)(nil),                 // 12: iam.SystemInfo
+	(*GetRoleSystemsResp)(nil),         // 13: iam.GetRoleSystemsResp
 }
 var file_proto_iam_proto_depIdxs = []int32{
-	3, // 0: iam.GetAdminUserByIDResp.Data:type_name -> iam.AdminUserInfo
-	3, // 1: iam.BatchGetAdminUserResp.Data:type_name -> iam.AdminUserInfo
-	3, // 2: iam.GetAdminUserByNickNameResp.Data:type_name -> iam.AdminUserInfo
-	8, // 3: iam.GetRoleSystemsResp.Data:type_name -> iam.SystemInfo
-	0, // 4: iam.Iam.GetAdminUserByID:input_type -> iam.GetAdminUserByIDReq
-	2, // 5: iam.Iam.BatchGetAdminUser:input_type -> iam.BatchGetAdminUserReq
-	5, // 6: iam.Iam.GetAdminUserByNickName:input_type -> iam.GetAdminUserByNickNameReq
-	7, // 7: iam.Iam.GetRoleSystems:input_type -> iam.GetRoleSystemsReq
-	1, // 8: iam.Iam.GetAdminUserByID:output_type -> iam.GetAdminUserByIDResp
-	4, // 9: iam.Iam.BatchGetAdminUser:output_type -> iam.BatchGetAdminUserResp
-	6, // 10: iam.Iam.GetAdminUserByNickName:output_type -> iam.GetAdminUserByNickNameResp
-	9, // 11: iam.Iam.GetRoleSystems:output_type -> iam.GetRoleSystemsResp
-	8, // [8:12] is the sub-list for method output_type
-	4, // [4:8] is the sub-list for method input_type
-	4, // [4:4] is the sub-list for extension type_name
-	4, // [4:4] is the sub-list for extension extendee
-	0, // [0:4] is the sub-list for field type_name
+	7,  // 0: iam.CheckTokenResp.Data:type_name -> iam.AdminUserInfo
+	7,  // 1: iam.GetAdminUserByIDResp.Data:type_name -> iam.AdminUserInfo
+	7,  // 2: iam.BatchGetAdminUserResp.Data:type_name -> iam.AdminUserInfo
+	7,  // 3: iam.GetAdminUserByNickNameResp.Data:type_name -> iam.AdminUserInfo
+	12, // 4: iam.GetRoleSystemsResp.Data:type_name -> iam.SystemInfo
+	0,  // 5: iam.Iam.CheckToken:input_type -> iam.CheckTokenReq
+	2,  // 6: iam.Iam.DeleteToken:input_type -> iam.DeleteTokenReq
+	4,  // 7: iam.Iam.GetAdminUserByID:input_type -> iam.GetAdminUserByIDReq
+	6,  // 8: iam.Iam.BatchGetAdminUser:input_type -> iam.BatchGetAdminUserReq
+	9,  // 9: iam.Iam.GetAdminUserByNickName:input_type -> iam.GetAdminUserByNickNameReq
+	11, // 10: iam.Iam.GetRoleSystems:input_type -> iam.GetRoleSystemsReq
+	1,  // 11: iam.Iam.CheckToken:output_type -> iam.CheckTokenResp
+	3,  // 12: iam.Iam.DeleteToken:output_type -> iam.DeleteTokenResp
+	5,  // 13: iam.Iam.GetAdminUserByID:output_type -> iam.GetAdminUserByIDResp
+	8,  // 14: iam.Iam.BatchGetAdminUser:output_type -> iam.BatchGetAdminUserResp
+	10, // 15: iam.Iam.GetAdminUserByNickName:output_type -> iam.GetAdminUserByNickNameResp
+	13, // 16: iam.Iam.GetRoleSystems:output_type -> iam.GetRoleSystemsResp
+	11, // [11:17] is the sub-list for method output_type
+	5,  // [5:11] is the sub-list for method input_type
+	5,  // [5:5] is the sub-list for extension type_name
+	5,  // [5:5] is the sub-list for extension extendee
+	0,  // [0:5] is the sub-list for field type_name
 }
 
 func init() { file_proto_iam_proto_init() }
@@ -716,7 +961,7 @@ func file_proto_iam_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_proto_iam_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   10,
+			NumMessages:   14,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 80 - 0
server/package/entrance-grpc/iam/iam_grpc.pb.go

@@ -19,6 +19,8 @@ import (
 const _ = grpc.SupportPackageIsVersion9
 
 const (
+	Iam_CheckToken_FullMethodName             = "/iam.Iam/CheckToken"
+	Iam_DeleteToken_FullMethodName            = "/iam.Iam/DeleteToken"
 	Iam_GetAdminUserByID_FullMethodName       = "/iam.Iam/GetAdminUserByID"
 	Iam_BatchGetAdminUser_FullMethodName      = "/iam.Iam/BatchGetAdminUser"
 	Iam_GetAdminUserByNickName_FullMethodName = "/iam.Iam/GetAdminUserByNickName"
@@ -29,6 +31,10 @@ const (
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 type IamClient interface {
+	// 校验Token
+	CheckToken(ctx context.Context, in *CheckTokenReq, opts ...grpc.CallOption) (*CheckTokenResp, error)
+	// 删除Token
+	DeleteToken(ctx context.Context, in *DeleteTokenReq, opts ...grpc.CallOption) (*DeleteTokenResp, error)
 	// 根据ID获取管理员信息
 	GetAdminUserByID(ctx context.Context, in *GetAdminUserByIDReq, opts ...grpc.CallOption) (*GetAdminUserByIDResp, error)
 	// 批量获取管理员信息
@@ -47,6 +53,26 @@ func NewIamClient(cc grpc.ClientConnInterface) IamClient {
 	return &iamClient{cc}
 }
 
+func (c *iamClient) CheckToken(ctx context.Context, in *CheckTokenReq, opts ...grpc.CallOption) (*CheckTokenResp, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(CheckTokenResp)
+	err := c.cc.Invoke(ctx, Iam_CheckToken_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *iamClient) DeleteToken(ctx context.Context, in *DeleteTokenReq, opts ...grpc.CallOption) (*DeleteTokenResp, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(DeleteTokenResp)
+	err := c.cc.Invoke(ctx, Iam_DeleteToken_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 func (c *iamClient) GetAdminUserByID(ctx context.Context, in *GetAdminUserByIDReq, opts ...grpc.CallOption) (*GetAdminUserByIDResp, error) {
 	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
 	out := new(GetAdminUserByIDResp)
@@ -91,6 +117,10 @@ func (c *iamClient) GetRoleSystems(ctx context.Context, in *GetRoleSystemsReq, o
 // All implementations must embed UnimplementedIamServer
 // for forward compatibility.
 type IamServer interface {
+	// 校验Token
+	CheckToken(context.Context, *CheckTokenReq) (*CheckTokenResp, error)
+	// 删除Token
+	DeleteToken(context.Context, *DeleteTokenReq) (*DeleteTokenResp, error)
 	// 根据ID获取管理员信息
 	GetAdminUserByID(context.Context, *GetAdminUserByIDReq) (*GetAdminUserByIDResp, error)
 	// 批量获取管理员信息
@@ -109,6 +139,12 @@ type IamServer interface {
 // pointer dereference when methods are called.
 type UnimplementedIamServer struct{}
 
+func (UnimplementedIamServer) CheckToken(context.Context, *CheckTokenReq) (*CheckTokenResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CheckToken not implemented")
+}
+func (UnimplementedIamServer) DeleteToken(context.Context, *DeleteTokenReq) (*DeleteTokenResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DeleteToken not implemented")
+}
 func (UnimplementedIamServer) GetAdminUserByID(context.Context, *GetAdminUserByIDReq) (*GetAdminUserByIDResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetAdminUserByID not implemented")
 }
@@ -142,6 +178,42 @@ func RegisterIamServer(s grpc.ServiceRegistrar, srv IamServer) {
 	s.RegisterService(&Iam_ServiceDesc, srv)
 }
 
+func _Iam_CheckToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(CheckTokenReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(IamServer).CheckToken(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: Iam_CheckToken_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(IamServer).CheckToken(ctx, req.(*CheckTokenReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Iam_DeleteToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DeleteTokenReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(IamServer).DeleteToken(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: Iam_DeleteToken_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(IamServer).DeleteToken(ctx, req.(*DeleteTokenReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 func _Iam_GetAdminUserByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(GetAdminUserByIDReq)
 	if err := dec(in); err != nil {
@@ -221,6 +293,14 @@ var Iam_ServiceDesc = grpc.ServiceDesc{
 	ServiceName: "iam.Iam",
 	HandlerType: (*IamServer)(nil),
 	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "CheckToken",
+			Handler:    _Iam_CheckToken_Handler,
+		},
+		{
+			MethodName: "DeleteToken",
+			Handler:    _Iam_DeleteToken_Handler,
+		},
 		{
 			MethodName: "GetAdminUserByID",
 			Handler:    _Iam_GetAdminUserByID_Handler,

+ 23 - 0
server/package/entrance-grpc/proto/iam.proto

@@ -5,6 +5,10 @@ package iam;
 option go_package = "./iam";
 
 service Iam {
+  // 校验Token
+  rpc CheckToken(CheckTokenReq) returns (CheckTokenResp) {}
+  // 删除Token
+  rpc DeleteToken(DeleteTokenReq) returns (DeleteTokenResp) {}
   // 根据ID获取管理员信息
   rpc GetAdminUserByID(GetAdminUserByIDReq) returns (GetAdminUserByIDResp) {}
   // 批量获取管理员信息
@@ -15,6 +19,24 @@ service Iam {
   rpc GetRoleSystems(GetRoleSystemsReq) returns (GetRoleSystemsResp) {}
 }
 
+message CheckTokenReq {
+  string Token = 1;
+}
+
+message CheckTokenResp {
+  int64 Code = 1;
+  string Msg = 2;
+  AdminUserInfo Data = 3;
+}
+
+message DeleteTokenReq {
+  string Token = 1;
+}
+message DeleteTokenResp {
+  int64 Code = 1;
+  string Msg = 2;
+}
+
 message GetAdminUserByIDReq {
   int64 UID = 1;
 }
@@ -35,6 +57,7 @@ message AdminUserInfo  {
   string UserName = 3;
   string NickName = 4;
   int64 Status = 5;
+  string Avatar = 6;
 }
 
 message BatchGetAdminUserResp {

+ 0 - 1
server/package/entrance-grpc/protoc.bat

@@ -1,3 +1,2 @@
 protoc --go_out=. --go-grpc_out=. .\proto\*.proto
-
 exit

+ 3 - 4
web/src/api/system/user.ts

@@ -53,11 +53,10 @@ export function changePassword(params, uid) {
   );
 }
 
-export function logout(params) {
+export function logout() {
   return http.request({
-    url: '/login/logout',
-    method: 'POST',
-    params,
+    url: '/user/logout',
+    method: 'GET',
   });
 }
 

+ 2 - 1
web/src/store/modules/user.ts

@@ -5,7 +5,7 @@ import { ACCESS_TOKEN, CURRENT_USER, IS_LOCKSCREEN } from '@/store/mutation-type
 import { ResultEnum } from '@/enums/httpEnum';
 
 const Storage = createStorage({ storage: localStorage });
-import { feiShuUserLogin, getUserInfo } from '@/api/system/user';
+import {feiShuUserLogin, getUserInfo, logout} from '@/api/system/user';
 import { storage } from '@/utils/Storage';
 
 export interface IUserState {
@@ -104,6 +104,7 @@ export const useUserStore = defineStore({
 
     // 登出
     async logout() {
+      await logout();
       this.setPermissions([]);
       this.setUserInfo('');
       storage.remove(ACCESS_TOKEN);

+ 15 - 15
web/src/views/entrance/index.vue

@@ -84,7 +84,7 @@
   import { useDialog, useMessage } from 'naive-ui';
   import { ACCESS_TOKEN, TABS_ROUTES } from '@/store/mutation-types';
   import { storage } from '@/utils/Storage';
-  import { GetServiceList, SelectSystem } from '@/api/service/service';
+  import { GetServiceList } from '@/api/service/service';
   import { ref } from 'vue';
   import Role from '../permission/role/role.vue';
   import User from '../permission/user/user.vue';
@@ -194,20 +194,20 @@
       // async getSystemList() {
       //   this.servers = await GetServiceList();
       // },
-      async openNewPage(url: string, system_id: number) {
-        await SelectSystem({
-          ...{ system_id: system_id },
-        })
-          .then((res) => {
-            console.log('_res:' + JSON.stringify(res));
-            // const ex = 7 * 24 * 60 * 60 * 1000;
-            // storage.set(ACCESS_TOKEN, res.token, ex);
-            const path = url.replace('{access-token}', storage.get(ACCESS_TOKEN));
-            window.open(path, '_self');
-          })
-          .catch((e: Error) => {
-            this.message.error(e.message ?? '操作失败');
-          });
+      openNewPage(url: string) {
+        // await SelectSystem({
+        //   ...{ system_id: system_id },
+        // })
+        //   .then((res) => {
+        // console.log('_res:' + JSON.stringify(res));
+        // const ex = 7 * 24 * 60 * 60 * 1000;
+        // storage.set(ACCESS_TOKEN, res.token, ex);
+        const path = url.replace('{access-token}', storage.get(ACCESS_TOKEN));
+        window.open(path, '_self');
+        // })
+        // .catch((e: Error) => {
+        //   this.message.error(e.message ?? '操作失败');
+        // });
       },
     },
   };