前后端tokenkey修改
This commit is contained in:
parent
a9884f06b1
commit
77db14e9d3
@ -2,7 +2,7 @@ package com.inspur.common.constant;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存的key 常量
|
* 缓存的key 常量
|
||||||
*
|
*
|
||||||
* @author inspur
|
* @author inspur
|
||||||
*/
|
*/
|
||||||
public class CacheConstants
|
public class CacheConstants
|
||||||
@ -10,45 +10,45 @@ public class CacheConstants
|
|||||||
/**
|
/**
|
||||||
* 登录用户 redis key
|
* 登录用户 redis key
|
||||||
*/
|
*/
|
||||||
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
|
public static final String LOGIN_TOKEN_KEY = "master_login_tokens:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码 redis key
|
* 验证码 redis key
|
||||||
*/
|
*/
|
||||||
public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
|
public static final String CAPTCHA_CODE_KEY = "master_captcha_codes:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数管理 cache key
|
* 参数管理 cache key
|
||||||
*/
|
*/
|
||||||
public static final String SYS_CONFIG_KEY = "sys_config:";
|
public static final String SYS_CONFIG_KEY = "master_sys_config:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典管理 cache key
|
* 字典管理 cache key
|
||||||
*/
|
*/
|
||||||
public static final String SYS_DICT_KEY = "sys_dict:";
|
public static final String SYS_DICT_KEY = "master_sys_dict:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 防重提交 redis key
|
* 防重提交 redis key
|
||||||
*/
|
*/
|
||||||
public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
|
public static final String REPEAT_SUBMIT_KEY = "master_repeat_submit:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限流 redis key
|
* 限流 redis key
|
||||||
*/
|
*/
|
||||||
public static final String RATE_LIMIT_KEY = "rate_limit:";
|
public static final String RATE_LIMIT_KEY = "master_rate_limit:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录账户密码错误次数 redis key
|
* 登录账户密码错误次数 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规则
|
* ipc规则
|
||||||
*/
|
*/
|
||||||
public static final String IPC_RULES_KEY = "ipc_rules:";
|
public static final String IPC_RULES_KEY = "master_ipc_rules:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ipc运行状态
|
* ipc运行状态
|
||||||
*/
|
*/
|
||||||
public static final String IPC_RUNNING_STATUS_KEY = "ipc_running_status:";
|
public static final String IPC_RUNNING_STATUS_KEY = "master_ipc_running_status:";
|
||||||
}
|
}
|
||||||
|
@ -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() {
|
export function getToken() {
|
||||||
return Cookies.get(TokenKey)
|
return Cookies.get(TokenKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setToken(token) {
|
export function setToken(token) {
|
||||||
return Cookies.set(TokenKey, token)
|
return Cookies.set(TokenKey, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeToken() {
|
export function removeToken() {
|
||||||
return Cookies.remove(TokenKey)
|
return Cookies.remove(TokenKey);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user