import request from "@/utils/request"; //引入axios请求及拦截器
export default {
  //获取订单商城商品包列表
  getBsGoodPackList(params) {
    return request({
      url: "/bs/BsGoods/getBsGoodlist",
      method: "get",
      params: params,
    });
  },

  //获取订单商城商品列表(题库，直播，课程)
  getBsGoodList(params) {
    return request({
      url: "/bs/BsGoods/goodsList",
      method: "get",
      params: params,
    });
  },

  //获取企业b端不同商品列表(题库，直播，课程)详情
  getBsTypeGoodsDetail(configId) {
    return request({
      url: "/bs/BsGoods/" + configId,
      method: "get",
    });
  },

  // 获取商品包详情
  getBsGoodPackDetail(params) {
    return request({
      url: "/bs/BsGoods/getBsGoodlist",
      method: "get",
      params: params,
    });
  },

  // 收藏商品列表
  getGoodsCollectList(params) {
    return request({
      url: "/bs/goods/collection/list",
      method: "get",
      params: params,
    });
  },

  // 收藏新增
  addGoodsCollect(data) {
    return request({
      url: "/bs/goods/collection",
      method: "post",
      data: data,
    });
  },

  // 收藏取消
  delGoodsCollect(data) {
    return request({
      url: "/bs/goods/collection/cancel",
      method: "post",
      data: data,
    });
  },

  // 商品是否已收藏
  isCollect(params) {
    return request({
      url: "/bs/goods/collection/id",
      method: "get",
      params: params,
    });
  },

  // 业务层次获取科目
  goodsSubjectList(params) {
    return request({
      url: "/bs/app/common/course/subject/list",
      method: "get",
      params: params,
    });
  },
  // 科目获取商品
  subjectGoodsList(params) {
    return request({
      url: "/bs/BsGoods/goodsList",
      method: "get",
      params: params,
    });
  },
  // 查询默认员工匹配商品列表列表接口
  dafaultStudent(params) {
    return request({
      url: "/system/staff/getMatchGoods",
      method: "get",
      params: params,
    });
  },
  // 查询导入员工匹配商品列表列表接口
  importStudent(data) {
    return request({
      url: "/system/staff/getStaffGoods",
      method: "post",
      data: data,
    });
  },

  // 当前教育类型科目下商品年份列表
  goodsYear(params) {
    return request({
      url: "/bs/BsGoods/goodsYear",
      method: "get",
      params: params,
    });
  },
};
