import request from '@/utils/request';
/**
 * 根据编码获取物品类别信息详情
 * @param code 产品编码
 */
export async function getByCode(code) {
  const res = await request.get(`/main/category/getByCode/${code}`);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
