api.js 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. import { ANOTHER_TF_INTERFACE } from '@/config'
  2. // 导入api接口模块
  3. // 获取当前环境变量 true => 生产环境 false => 开发环境
  4. // const BASEURL = process.env.VUE_APP_DOMAIN_PREFIX
  5. const BASEURL = process.env.NODE_ENV === 'production' ? ANOTHER_TF_INTERFACE : 'http://192.168.0.91:9007'
  6. // const BASEURL = (process.env.NODE_ENV === 'production') ? 'http://127.0.0.1:9007' : 'http://127.0.0.1:9007'
  7. export const api = {
  8. // 画布模块
  9. fileUpload: BASEURL + '/file/upload', // 文件上传
  10. getClassify: BASEURL + '/canvas/getClassify', // 查询分类层级
  11. getProducts: BASEURL + '/canvas/getProducts', // 选择商品查询
  12. getProductsV2: BASEURL + '/canvas/getProducts2', // 选择商品查询V2(2023.3.9 优化版本接口)
  13. saveCanvas: BASEURL + '/canvas/saveCanvas', // 保存画布
  14. getCanvas: BASEURL + '/canvas/getCanvas', // 读取画布
  15. getShops: BASEURL + '/canvas/getShops', // 选择店铺查询
  16. getCoupons: BASEURL + '/canvas/getCoupons', // 优惠券查询
  17. getShopCoupons: BASEURL + '/canvas/getShopCoupons', // 优惠券查询
  18. takeCoupon: BASEURL + '/coupon/takeCoupon', // 领取优惠券
  19. selectCanvasCustomList: BASEURL + '/canvas/selectCanvasCustomList', // 自定义页面查询
  20. getPlatformSeckills: `${BASEURL}/canvas/getPlatformSeckills`, // 平台秒杀活动
  21. getSeckills: `${BASEURL}/renovation/getSeckills`, // 商家秒杀活动w
  22. getMinDiscount: `${BASEURL}/canvas/getMinDiscount`, // 平台限时折扣
  23. getDiscounts: `${BASEURL}/renovation/getDiscounts`, // 商家限时折扣
  24. getAdminGroupWorks: `${BASEURL}/canvas/getGroupWorks`, // 平台拼团专区
  25. getGroupWorks: `${BASEURL}/renovation/getGroupWorks`, // 商家拼团专区
  26. getPriceProducts: `${BASEURL}/canvas/getPriceProducts`, // 商家定价捆绑
  27. getPrices: `${BASEURL}/canvas/getPrices`, // 商家定价捆绑
  28. getMemberProducts: `${BASEURL}/canvas/getMemberProducts`, // 查询会员商品数据
  29. getNotices: `${BASEURL}/canvas/getNotices`, // 平台获取公告数据
  30. }
  31. export default api