fix: 无法登录
This commit is contained in:
@@ -9,9 +9,8 @@ export function getToken() {
|
|||||||
|
|
||||||
export function setToken(token, rememberMe) {
|
export function setToken(token, rememberMe) {
|
||||||
const domain = window.localStorage.getItem('sso_domain')
|
const domain = window.localStorage.getItem('sso_domain')
|
||||||
if (rememberMe) {
|
const token2 = token.split(' ')[1].trim()
|
||||||
return Cookies.set(TokenKey, token, { domain: domain, path: '/', expires: Config.tokenCookieExpires })
|
return Cookies.set(TokenKey, token2)
|
||||||
} else return Cookies.set(TokenKey, token, { domain: domain, path: '/' })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeToken() {
|
export function removeToken() {
|
||||||
|
|||||||
Reference in New Issue
Block a user