apiMap.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // const env = {
  2. // dev: {
  3. // MODE: 'development',
  4. // ENV_API: `http://127.0.0.1:${devPort}` //测试服务器地址
  5. // },
  6. // pro: {
  7. // MODE: 'production',
  8. // ENV_API: `http://127.0.0.1:${serverPort}` // 正式服务器地址
  9. // }
  10. // }
  11. const devPort = 3000;
  12. const serverPort = 4201;
  13. export const baseUrl = process.env.ENV_API;
  14. console.log('baseUrl', baseUrl);
  15. export const apiMap = {
  16. searchProduct: {
  17. path: `/api/product/search`,
  18. },
  19. searchProductMini: {
  20. path: `/api/product/mini`,
  21. },
  22. productInfo: {
  23. path: `/api/product`
  24. },
  25. searchSolution: {
  26. path: `/api/solution/search`,
  27. },
  28. solutionInfo: {
  29. path: `/api/solution`
  30. },
  31. addPageRead: {
  32. path: `/api/news/read`
  33. },
  34. searchNews: {
  35. path: `/api/news/search`,
  36. },
  37. searchNewsMini: {
  38. path: `/api/news/mini`,
  39. },
  40. newsInfo: {
  41. // 新闻与解决方案都是文章,不多做接口
  42. path: `/api/solution`
  43. },
  44. downloads: {
  45. path: `/api/download/list`
  46. },
  47. downloadItem: {
  48. path: `/api/download/`
  49. },
  50. carouselList: {
  51. path: `/api/base/carousel`
  52. },
  53. carouselAllList: {
  54. path: `/api/base/carousel/list`
  55. },
  56. baseTypes: {
  57. path: `/api/base/types`
  58. },
  59. baseAddCarousel: {
  60. path: `/api/base/carousel`
  61. },
  62. baseUpdateCarousel: {
  63. path: `/api/base/carousel`
  64. }
  65. }