import request from './fetcher/request'

export default {
  getCompanyList (data) {
    data = Object.assign({
      pageNum: 1,
      pageSize: 999,
      tradeName: ''
    }, data)
    return request.get('company/getCompanyList', data)
  },
  getActivityDetail () {
    return  request.get('activity/getActivityDetail')
  },
  getCategoryList (data) {
    data = Object.assign({
      pageNum: 1,
      pageSize: 999
    }, data)
    return request.get('goods/category/getCategoryList', data)
  },
  getCategoryGoods (data) {
    return request.get('goods/getGoodsListByCategory', data)
  },
  getGoodsDetail (goodsId) {
    return request.get('goods/getGoodsDetail', { goodsId })
  },
  postApiData (data) {
    console.log(data, 'data')
    let app = getApp()
    let defaultData = {
      userId: app.globalData.userinfo ? app.globalData.userinfo.viewerId || '' : '',
      guideId: ''
    }
    return request.get('company/sendData', Object.assign(defaultData, data))
  }
}