From 77db14e9d35324c9f67f20d372e754b50dde000b Mon Sep 17 00:00:00 2001 From: zhanghan11 Date: Wed, 3 Jul 2024 10:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=90=8E=E7=AB=AFtokenkey=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/CacheConstants.java | 20 +++++++++---------- zfipc-ui/src/utils/auth.js | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/zfipc-server/zfipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java b/zfipc-server/zfipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java index 9671a9c..05b169d 100644 --- a/zfipc-server/zfipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java +++ b/zfipc-server/zfipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java @@ -2,7 +2,7 @@ package com.inspur.common.constant; /** * 缓存的key 常量 - * + * * @author inspur */ public class CacheConstants @@ -10,45 +10,45 @@ public class CacheConstants /** * 登录用户 redis key */ - public static final String LOGIN_TOKEN_KEY = "login_tokens:"; + public static final String LOGIN_TOKEN_KEY = "master_login_tokens:"; /** * 验证码 redis key */ - public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; + public static final String CAPTCHA_CODE_KEY = "master_captcha_codes:"; /** * 参数管理 cache key */ - public static final String SYS_CONFIG_KEY = "sys_config:"; + public static final String SYS_CONFIG_KEY = "master_sys_config:"; /** * 字典管理 cache key */ - public static final String SYS_DICT_KEY = "sys_dict:"; + public static final String SYS_DICT_KEY = "master_sys_dict:"; /** * 防重提交 redis key */ - public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; + public static final String REPEAT_SUBMIT_KEY = "master_repeat_submit:"; /** * 限流 redis key */ - public static final String RATE_LIMIT_KEY = "rate_limit:"; + public static final String RATE_LIMIT_KEY = "master_rate_limit:"; /** * 登录账户密码错误次数 redis key */ - public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:"; + public static final String PWD_ERR_CNT_KEY = "master_pwd_err_cnt:"; /** * ipc规则 */ - public static final String IPC_RULES_KEY = "ipc_rules:"; + public static final String IPC_RULES_KEY = "master_ipc_rules:"; /** * ipc运行状态 */ - public static final String IPC_RUNNING_STATUS_KEY = "ipc_running_status:"; + public static final String IPC_RUNNING_STATUS_KEY = "master_ipc_running_status:"; } diff --git a/zfipc-ui/src/utils/auth.js b/zfipc-ui/src/utils/auth.js index 09d4b55..33abaa9 100644 --- a/zfipc-ui/src/utils/auth.js +++ b/zfipc-ui/src/utils/auth.js @@ -1,15 +1,15 @@ -import Cookies from 'js-cookie' +import Cookies from "js-cookie"; -const TokenKey = 'zfipc-Token' +const TokenKey = "zfipc-master-Token"; export function getToken() { - return Cookies.get(TokenKey) + return Cookies.get(TokenKey); } export function setToken(token) { - return Cookies.set(TokenKey, token) + return Cookies.set(TokenKey, token); } export function removeToken() { - return Cookies.remove(TokenKey) + return Cookies.remove(TokenKey); }