feat: refresh UI and add vite ci workflow

This commit is contained in:
你çšnepiedg
2026-03-18 19:24:51 +08:00
parent 31e504a997
commit 55f5c216bd
50 changed files with 13304 additions and 437 deletions
+43
View File
@@ -0,0 +1,43 @@
const STORAGE_PREFIX = 'smt_'
export const storage = {
set(key, value) {
try {
uni.setStorageSync(STORAGE_PREFIX + key, JSON.stringify(value))
} catch (e) {
console.error('Storage set error:', e)
}
},
get(key, defaultValue = null) {
try {
const value = uni.getStorageSync(STORAGE_PREFIX + key)
return value ? JSON.parse(value) : defaultValue
} catch (e) {
console.error('Storage get error:', e)
return defaultValue
}
},
remove(key) {
try {
uni.removeStorageSync(STORAGE_PREFIX + key)
} catch (e) {
console.error('Storage remove error:', e)
}
},
clear() {
try {
uni.clearStorageSync()
} catch (e) {
console.error('Storage clear error:', e)
}
}
}
export const SESSION_KEY = 'session_key'
export const USER_KEY = 'user'
export const PROFILE_KEY = 'profile'
export const USER_MODE_KEY = 'user_mode'
export const QUIT_CHECKIN_KEY = 'quit_checkin'