装备栏、技能栏

This commit is contained in:
2025-03-15 11:13:34 +08:00
parent 5d5dc59526
commit 8be0aa2a5a
83 changed files with 353 additions and 60 deletions
+4 -3
View File
@@ -4,7 +4,7 @@ import { defineStore } from "pinia"
export const useInfoStore = defineStore("infoStore", ()=>{
const token = ref<string>("")
const alter_token = ref<string>("")
const infos = ref<ICharacterInfo | null>(null)
const skills = computed(()=>infos.value?.skills ?? [])
@@ -14,12 +14,13 @@ export const useInfoStore = defineStore("infoStore", ()=>{
const suits = computed(()=>infos.value?.suits ?? [])
const createCharacter = async (alter: string, equVersion?: string) => {
token.value = await api.createToken(alter, equVersion)
const time = new Date().getTime()
alter_token.value = btoa(JSON.stringify({alter, equVersion, time}))
infos.value = await api.characterInfo()
}
return {
token,
alter_token,
infos,
skills,
equips,