12121
This commit is contained in:
38
Web/src/services/Index/FightService.ts
Normal file
38
Web/src/services/Index/FightService.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
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 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user