// 物业管理员
import http from "@/apis/axios";
const api = "abutment/";
export default {
  // 添加
  add: (data, params) => http(api + "createGood", data, "post", params),

  // 分页查询
  list: (data, params) => http(api + "getGoodList", data, "post", params),
  //获取全部规格值
  valueall: (data, params) => http(api + "allSpec", data, "post", params),
  //规格值添加
  valueadd: (data, params) => http(api + "createSpec", data, "post", params),
  // 详情
  detail: (data, params) => http(api + "getGoodDetail", data, "post", params),
  // 基础信息更改
  update: (data, params) =>
    http(api + "updateGoodBasicsInfo", data, "post", params),
  // 成本更改
  updateP: (data, params) =>
    http(api + "updateGoodPriceInfo", data, "post", params),

  //商品数据修改(全部)
  edit_update: (data, params) => http(api + "editGoodUp", data, "post", params),
  // 判断是否允许修改成本信息和基础信息
  checkIsUpdate: (data, params) =>
    http(api + "checkIsUpdate", data, "post", params),
  // 复制商品
  copy: (data, params) => http(api + "goodCopy", data, "post", params),
  // 删除
  delete: (data, params) => http(api + "goodupdelall", data, "post", params),
  // 更新状态
  status: (data, params) => http(api + "goodexam", data, "post", params),
  // ...获取分类详情
  catinfo: (data, params) => http(api + "catInfo", data, "post", params),

  // 取实时金价
  golpricelast: (data, params) =>
    http(api + "goldPriceLastList", data, "post", params),

  //同一个spuCode下所有的商品都下线
  goodupoffline: (data, params) =>
    http(api + "goodupoffline", data, "post", params),
};
