import http, { type EnumInfoDto } from "../api/index"; export interface Pill { id: number; name: string; type?: number; rarity?: number; description: string; requirdLevelId?: number; effectValue?: number; duration?: number; icon?: string | null; } //获取所有 export const GetPillList = (): Promise => { return http.get("pill/all"); }; //添加丹药 export const AddPill = (data: Pill): Promise => { return http.post("pill", data); } //修改丹药 export const UpdatePill = (data: Pill): Promise => { return http.put("pill", data); } //删除丹药 export const DeletePill = (id: number): Promise => { return http.delete(`pill/${id}`); } //获取丹药等级 export const getPillGrades = (): Promise => { return http.get('pill/grades'); } //获取丹药类型 export const getPillTypes = (): Promise => { return http.get('pill/types'); } //获取丹药稀有度 export const getPillRarities = (): Promise => { return http.get('pill/rarities'); }