Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-05 18:59:06 +08:00
co-authored by Copilot
parent 44c9df9b20
commit 01b648a3e7
52 changed files with 2491 additions and 89 deletions
+12
View File
@@ -0,0 +1,12 @@
import type { IConfig } from '@/stores'
import { defineRequest } from '../common'
import type { IResult } from './type'
export default defineRequest((request) => {
return {
async calc(config: IConfig) {
const res = await request.post<IResult>('/calc', config)
return res.data
},
}
})
// Compare this snippet from frontend/src/api/common/index.ts:
+56
View File
@@ -0,0 +1,56 @@
export interface IResult {
uuid: string
skills: IResultSkill[]
info: IResultUserInfo[]
suits: {
suit?: IResultSuit
oath?: IResultSuit
correction?: number
}
buffer: boolean
}
export interface IResultSkill {
name: string
icon: string
lv: number
data: number
ratio: number
cd: number
damage: number
mode: string
buff: number[]
learnLv: number
type: string
}
export interface IResultUserInfo {
id: number
name: string
value: string | number
}
export interface IResultSuit {
id: string
count: number
imageUrl: string
level: number
name: string
point: number
rarity: string
value: string
suitId: string
skills: {
id: string
skillId: string
name: string
imageUrl: string
enable: boolean
}[]
}
export interface IResultSkillCount {
count: number
mode: string
name: string
}