初始化本地仓库

This commit is contained in:
2026-08-31 11:33:59 +08:00
commit 663f74b633
2390 changed files with 402918 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
const THEME_MODE_STORAGE_KEY = 'scanapp_theme_mode'
export function getAppThemeMode() {
return uni.getStorageSync(THEME_MODE_STORAGE_KEY) === 'dark' ? 'dark' : 'light'
}
export function applyAppTheme(mode) {
const themeMode = mode === 'dark' ? 'dark' : 'light'
uni.setStorageSync(THEME_MODE_STORAGE_KEY, themeMode)
uni.setNavigationBarColor({
frontColor: themeMode === 'dark' ? '#ffffff' : '#000000',
backgroundColor: themeMode === 'dark' ? '#151923' : '#ffffff'
})
uni.$emit('scanapp-theme-change', themeMode)
return themeMode
}