import request from '@/utils/request';

// 自定义商品类别列表
export async function handleGetUSERDEFINEDTYPEList(params?: any) {

  const data = await request(`/BaseInfo/GetUSERDEFINEDTYPEList`, {
    method: 'POST',
    data: params
  });

  if (data.Result_Code !== 100) {
    return {
      data: [],
      current: 1,
      pageSize: 10,
      total: 0,
      success: false
    }
  }
  return data.Result_Data.List
}


// 获取新增分类的门店信息
export async function handleGetServerpartShopList(params?: any) {

  const data = await request(`/BaseInfo/GetServerpartShopList`, {
    method: 'POST',
    data: params
  });

  if (data.Result_Code !== 100) {
    return {
      data: [],
      current: 1,
      pageSize: 10,
      total: 0,
      success: false
    }
  }
  return data.Result_Data.List
}

// 同步商品自定义类别表
export async function handleSynchroUSERDEFINEDTYPE(params?: any) {

  const data = await request(`/BaseInfo/SynchroUSERDEFINEDTYPE`, {
    method: 'POST',
    data: params
  });

  if (data.Result_Code !== 100) {
    return {
      data: [],
      current: 1,
      pageSize: 10,
      total: 0,
      success: false
    }
  }
  return data
}
