chore: 初始化uniapp前端项目基础框架

新增项目配置、静态资源、工具类、状态管理、API接口、组件库集成等全套基础代码,完成项目初始化搭建
This commit is contained in:
zhangtao
2026-08-02 03:49:27 +08:00
parent 7f8320d3ed
commit 3c9b77f994
278 changed files with 55387 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
/**
* 常量统一导出
*/
// 存储相关常量
export * from './storage.constant'
@@ -0,0 +1,51 @@
/**
* 存储键名常量
*
* @description
* 统一管理所有 uni.storage 的键名,与 web 端保持一致
* 命名规则:{分类}_{具体名称}(snake_case)
*/
// 🔐 用户认证相关
export const ACCESS_TOKEN_KEY = 'access_token'
export const REFRESH_TOKEN_KEY = 'refresh_token'
export const REMEMBER_ME_KEY = 'remember_me'
// 👤 用户数据相关
export const USER_INFO_KEY = 'user_info'
// 📊 数据缓存相关
export const DICT_CACHE_KEY = 'dict_cache'
// 🎨 系统设置相关
export const THEME_KEY = 'theme'
export const THEME_COLOR_KEY = 'themeColor'
// 🎯 角色常量
export const ROLE_ROOT = 'ADMIN'
// 📌 认证相关键集合
export const AUTH_KEYS = {
ACCESS_TOKEN: ACCESS_TOKEN_KEY,
REFRESH_TOKEN: REFRESH_TOKEN_KEY,
REMEMBER_ME: REMEMBER_ME_KEY,
} as const
// 📦 缓存相关键集合
export const CACHE_KEYS = {
DICT_CACHE: DICT_CACHE_KEY,
USER_INFO: USER_INFO_KEY,
} as const
// 🎨 设置相关键集合
export const SETTINGS_KEYS = {
THEME: THEME_KEY,
THEME_COLOR: THEME_COLOR_KEY,
} as const
// 📦 所有存储键的统一集合
export const ALL_STORAGE_KEYS = {
...AUTH_KEYS,
...CACHE_KEYS,
...SETTINGS_KEYS,
} as const