This commit is contained in:
2025-03-12 09:36:26 +08:00
parent b98464d8b5
commit 6053fba1da
22 changed files with 286 additions and 228 deletions
+12 -3
View File
@@ -1,10 +1,19 @@
import { defineRequest } from '../common'
import type { IAdventureInfo } from './type'
import type { IAdventureInfo, ICharacterInfo } from './type'
export default defineRequest((request) => {
return {
adventures() {
return request.get<IAdventureInfo[]>('/adventure').then((res) => res.data)
async adventures() {
const res = await request.get<IAdventureInfo[]>('/adventure')
return res.data
},
async createToken(alter: string, equVersion?: string) {
const res = await request.get<string>(`/token/get/${alter}`, { params: { equVersion } })
return res.data
},
async characterInfo() {
const res = await request.get<ICharacterInfo>('/character')
return res.data
},
}
})
+23 -14
View File
@@ -3,20 +3,6 @@ export interface IAdventureInfo {
name: string
children: IAlterInfo[]
}
export interface ITools {
name: string
tooltips: string
link: string
end?: Date
target: '_blank' | '_self'
}
export interface IMonster {
id: number
name: string
}
export interface IAlterOption {
name: string
title: string
@@ -31,4 +17,27 @@ export interface IAlterInfo {
options?: IAlterOption[]
open?: boolean
comment?: string
class?:string
}
export interface ICharacterInfo {
alter: string
name: string
equVersion: string
equips: IEquipment[]
weapons: string[]
skills: ISkill[]
suits: ISuit[]
}
export interface IEquipment {}
export interface ISkill {
icon: string
name: string
id: number
learnLv:number
positon:number
}
export interface ISuit {}