[Update] 修改了翻译

This commit is contained in:
ibuler
2020-05-13 14:41:28 +08:00
parent 12cd5d863c
commit 8fd8edf845
45 changed files with 382 additions and 338 deletions

View File

@@ -14,15 +14,19 @@ export function setToken(token) {
export function removeToken() {
return Cookies.remove(TokenKey)
}
export function getCurrentOrg() {
if (!Cookies.getJSON(CurrentOrg)) {
setCurrentOrg({ id: '', name: 'DEFAULT' })
let org = Cookies.getJSON(CurrentOrg)
if (!org) {
org = { id: '', name: 'DEFAULT' }
setCurrentOrg(org)
return org
}
return Cookies.getJSON(CurrentOrg)
return org
}
export function setCurrentOrg(token) {
Cookies.set(CurrentOrg, token)
export function setCurrentOrg(org) {
Cookies.set(CurrentOrg, org)
// 切换组织后重新刷新页面
window.location.reload(true)
}