// 数据存储 import { MyLocalStorage, MySessionStorage } from './storage/storage'; import { MyCookie } from './storage/cookie'; /** * 本地存储定义 * 应确保每个 storage 定义使用的 key 不重复,并做好注释 * 任意localStorage的定义,必须添加 localST_ 前缀 */ export const localST_Theme = new MyLocalStorage('theme'); // 主题 export const localST_Locale = new MyLocalStorage('locale'); // 多语言 export const localST_RecentAgent = new MyLocalStorage('recent_agent'); // 近期使用的agent export const localST_AllAgent = new MyLocalStorage('full_agent'); // 所有可用的agent export const localST_UserInfo = new MyLocalStorage('user_info'); // 用户信息 export const localST_RoutesList = new MyLocalStorage('routes_list'); // 用户身份token export const localST_RecentSearchType = new MyLocalStorage('recent_search_type'); // 最近的 /** * session storage定义 * 任意 sessionStorage的定义,必须添加 sessionST_ 前缀 */ export const sessionST_Expire = new MySessionStorage('expire'); /** * cookie定义 * 任意 cookie 的定义,必须添加 kuky_ 前缀 */ export const kuky_UserName = new MyCookie('user_name'); export const kuky_Authorization = new MyCookie('token'); // 用户身份token