@@ -13,6 +13,7 @@ export const useInfoStore = defineStore('infoStore', () => {
|
||||
suitId: string
|
||||
skillId: string
|
||||
rarity: string
|
||||
lv: number
|
||||
data: ISuit
|
||||
}[]
|
||||
>([])
|
||||
@@ -54,17 +55,17 @@ export const useInfoStore = defineStore('infoStore', () => {
|
||||
return result
|
||||
})
|
||||
|
||||
const getOathInfo = async (suitId: string, skillId: string, rarity: string) => {
|
||||
const getOathInfo = async (suitId: string, skillId: string, rarity: string, lv: number) => {
|
||||
const res = oathCache.value.find(
|
||||
(o) => o.suitId === suitId && o.skillId === skillId && o.rarity === rarity,
|
||||
(o) => o.suitId === suitId && o.skillId === skillId && o.rarity === rarity && o.lv === lv,
|
||||
)
|
||||
if (res) {
|
||||
return {
|
||||
...res.data,
|
||||
}
|
||||
}
|
||||
const data: ISuit = await api.getOathInfo(suitId, skillId, rarity)
|
||||
oathCache.value.push({ suitId, skillId, rarity, data })
|
||||
const data: ISuit = await api.getOathInfo(suitId, skillId, rarity, lv)
|
||||
oathCache.value.push({ suitId, skillId, rarity, lv, data })
|
||||
return {
|
||||
...data,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user