This commit is contained in:
2025-04-05 13:00:16 +08:00
parent e2099aa047
commit da8e163322
20 changed files with 1843 additions and 15196 deletions
+13 -2
View File
@@ -31,7 +31,10 @@ export interface IConfig {
fusion: string
}
>
jades: Record<string, number>
jades: Record<string, {
id:string
value: number
}>
avatar: Record<
string,
{
@@ -117,7 +120,15 @@ export const useConfigStore = defineStore('configStore', () => {
(config.value.skills[id] = {
lv: infoStore.skills.find((skill) => skill.id.toString() === id)?.maxLearnLv ?? 0,
})
})
});
(["0", "1", "2", "3"].filter((key) => !Object.keys(config.value.jades).includes(key)) ?? []).forEach((key) => {
config.value.jades[key] = {
id: '',
value: 0,
}
}
)
}
const saveConfig = () => {
+5
View File
@@ -1,6 +1,7 @@
import api from '@/api'
import type { ICharacterInfo } from '@/api/info/type'
import { defineStore } from 'pinia'
import { useConfigStore } from './config'
export const useInfoStore = defineStore('infoStore', () => {
const alter_token = ref<string>('')
@@ -20,6 +21,8 @@ export const useInfoStore = defineStore('infoStore', () => {
const avatars = computed(() => infos.value?.avatar ?? {})
// const jades = computed(() => infos.value?.jades ?? [])
const parts = [
'头肩',
'上衣',
@@ -45,6 +48,7 @@ export const useInfoStore = defineStore('infoStore', () => {
'胸部',
'上衣',
'皮肤',
'快捷栏装备',
'腰带',
'下装',
'鞋',
@@ -58,6 +62,7 @@ export const useInfoStore = defineStore('infoStore', () => {
const time = new Date().getTime()
alter_token.value = btoa(JSON.stringify({ alter, equVersion, time }))
infos.value = await api.characterInfo()
useConfigStore().loadConfig()
}
return {