index.js 953 B

123456789101112131415161718192021222324252627282930313233343536
  1. import request from './fetcher/request'
  2. export default {
  3. getCompanyList (data) {
  4. data = Object.assign({
  5. pageNum: 1,
  6. pageSize: 999,
  7. tradeName: ''
  8. }, data)
  9. return request.get('company/getCompanyList', data)
  10. },
  11. getActivityDetail () {
  12. return request.get('activity/getActivityDetail')
  13. },
  14. getCategoryList (data) {
  15. data = Object.assign({
  16. pageNum: 1,
  17. pageSize: 999
  18. }, data)
  19. return request.get('goods/category/getCategoryList', data)
  20. },
  21. getCategoryGoods (data) {
  22. return request.get('goods/getGoodsListByCategory', data)
  23. },
  24. getGoodsDetail (goodsId) {
  25. return request.get('goods/getGoodsDetail', { goodsId })
  26. },
  27. postApiData (data) {
  28. console.log(data, 'data')
  29. let app = getApp()
  30. let defaultData = {
  31. userId: app.globalData.userinfo ? app.globalData.userinfo.userId : ''
  32. }
  33. return request.post('company/sendData', Object.assign(defaultData, data))
  34. }
  35. }