添加配置项,首页

This commit is contained in:
cbb
2025-12-23 17:41:05 +08:00
parent d4d5cdb335
commit 0cf5bb9dad
12 changed files with 317 additions and 22 deletions

16
utils/storage.js Normal file
View File

@@ -0,0 +1,16 @@
import { STORAGE_KEYS } from '@/constants/storageKeys'
/** 保存 token */
export const setToken = (v) => {
return uni.setStorageSync(STORAGE_KEYS.TOKEN, v)
}
/** 获取 token */
export const getToken = () => {
return uni.getStorageSync(STORAGE_KEYS.TOKEN) || ''
}
/** 清楚 token */
export const removeToken = () => {
return uni.removeStorageSync(STORAGE_KEYS.TOKEN)
}