Files
Kg.SeaTime/Web/src/services/Index/FightService.ts
Putoo a1dbce8a96 111
2026-07-05 18:51:01 +08:00

46 lines
1.2 KiB
TypeScript

export class FightService {
/**
* 添加怪物战斗
* POST /Fight/FightMonster
* @param type body
* @param monsterId body
* @param sign body
*/
static async FightMonster(type: number, monsterId: string, sign: string) {
return await ApiService.Request("post", "/Fight/FightMonster", { type, monsterId, sign });
}
/**
* 战斗接口
* POST /Fight/Fight
* @param fightId body
* @param data body
*/
static async Fight(fightId: string, data: string) {
return await ApiService.Request("post", "/Fight/Fight", { fightId, data });
}
/**
* 退出战斗
* GET /Fight/Exit
*/
static async Exit(fightId: string) {
return await ApiService.Request("get", "/Fight/Exit", { fightId });
}
/**
* 使用药品
* GET /Fight/UseFightDrug
*/
static async UseFightDrug(fightId: string, drugId: string) {
return await ApiService.Request("get", "/Fight/UseFightDrug", { fightId, drugId });
}
/**
* 战斗信息
* GET /Fight/GetFightMsg
*/
static async GetFightMsg(fightId: string) {
return await ApiService.Request("get", "/Fight/GetFightMsg", { fightId });
}
}