Optimize the UI of config dialoy

This commit is contained in:
RockYang
2023-04-12 09:02:39 +08:00
parent aef3414928
commit a88f55372c
4 changed files with 50 additions and 40 deletions

View File

@@ -1,4 +1,6 @@
/* eslint-disable no-constant-condition */
import {dateFormat} from "@/utils/libs";
/**
* storage handler
*/
@@ -22,4 +24,15 @@ export function getLoginUser() {
export function setLoginUser(user) {
sessionStorage.setItem(SessionUserKey, JSON.stringify(user))
}
export function getUserInfo() {
const data = getLoginUser();
if (data !== null) {
const user = data["user"];
user['active_time'] = dateFormat(user['active_time']);
user['expired_time'] = dateFormat(user['expired_time']);
return user;
}
return {}
}