更新:增加“我的书单”功能

This commit is contained in:
2025-11-10 09:16:28 +08:00
parent 33f861fa14
commit 577e782cd8
25 changed files with 4515 additions and 37 deletions

22
stores/sys.ts Normal file
View File

@@ -0,0 +1,22 @@
// stores/user.ts
import { defineStore } from 'pinia'
import { setAuthToken, clearAuthToken } from '@/utils/auth'
import type { IUserInfo } from '@/types/user'
export const useSysStore = defineStore('sys', {
state: (): IUserInfo => ({
language: uni.getStorageSync('appLanguage') || 'zh-CN',
}),
getters: {
},
actions: {
/** 设置语言 */
setLanguage(language: string) {
this.language = language
uni.setStorageSync('appLanguage', language)
}
},
})