dev
This commit is contained in:
@@ -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
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user