import { AddWeaponParams, HistoryDictItem } from "@/types";
import { service } from "@dage/web-components";

export const weaponApi = {
  getDictList() {
    return service.get<HistoryDictItem[]>("/api/cms/goods/getDict");
  },
  getList(data: any) {
    return service.post<any>("/api/cms/goods/pageList", data);
  },
  add: (data: AddWeaponParams) => {
    return service.post("/api/cms/goods/save", data);
  },
  del: (id: number) => {
    return service.get(`/api/cms/goods/remove/${id}`);
  },
  getDetail: (id: string) => {
    return service.get<any>(`/api/cms/goods/detail/${id}`);
  },
};
