import Mock from 'mockjs'

Mock.mock(/baseCategoryInfo\/saveDef/, 'post', () => ({
  message: '操作成功',
  code: 200,
}))
Mock.mock(/local\/stockNumber/, 'get', () => ({
  message: '操作成功',
  data: [
    {
      warehouseSku: '22019081_BLK_2',
      quantity: 1,
    },
    {
      warehouseSku: '22019081_BLK_4',
      quantity: 2,
    },
  ],
  code: 200,
}))

Mock.mock(/baseCategoryInfo\/supplierList/, 'get', (params) => {
  console.log(params)
  const data = []
  for (let i = 0; i < 10; i++) {
    data.push({
      address: '杠三十公分',
      bankAccount: '545766867',
      belongTo: '224',
      buyer: '43',
      categoryName: '男装',
      code: '185',
      contact: '阿凡达',
      createTime: '2020-04-29 23:25:10',
      deliveryMethod: '127',
      email: '111@514.com',
      enable: true,
      id: i,
      limitDay: 181,
      name: '测试供应商182',
      payment: '124',
      phone: '12876544567',
      remark: '阿凡达的发',
      url: 'www.vvv.cc',
      wangwang: '345435_43406',
    })
  }
  return {
    message: '操作成功',
    data: data,
    code: 200,
  }
})

export default Mock
