ASNetApis.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // ASNetApis.h
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/11/25.
  6. //
  7. #ifndef ASNetApis_h
  8. #define ASNetApis_h
  9. #define BaseRequestrUrl(url) ([NSString stringWithFormat:@"%@%@",@"rest/V1/",url])
  10. #define BaseWebUrl(url) ([NSString stringWithFormat:@"%@%@",@"rest/V1/",url])
  11. // MARK: - host
  12. #if (DEBUG)
  13. #define HostPath @"www.bilisar.com"//@"https://www.bilisar.com/" //测试
  14. #else
  15. #define HostPath @"pc.bilisar.com"//@"https://pc.bilisar.com/" //正式
  16. #endif
  17. // MARK: - path
  18. #define ProductImgPath @"/media/catalog/product"
  19. #define CategoryImgPath @"/media/catalog/category/"
  20. // MARK: - 商品列表
  21. #define getProductListUrl BaseRequestrUrl(@"rewrite/categories/%@/products")
  22. // MARK: - 货币
  23. #define getAllCurrencyUrl BaseRequestrUrl(@"directory/currency")
  24. // MARK: - 分类列表
  25. #define getAllCategoriesUrl BaseRequestrUrl(@"rewrite/categories")
  26. // 热词
  27. #define getHotList BaseRequestrUrl(@"hot/index")
  28. // MARK: - userinfo
  29. #define registerUrl BaseRequestrUrl(@"customers")
  30. #define loginUrl BaseRequestrUrl(@"integration/customer/token")
  31. #define userinfoUrl BaseRequestrUrl(@"customers/me")
  32. #define vipInfoUrl BaseRequestrUrl(@"vip/index")
  33. #define userBirthUrl BaseRequestrUrl(@"vip/birthday")
  34. // MARK: - 修改用户信息
  35. #define putUserInfo BaseRequestrUrl(@"customers/me")
  36. #define putUserPassword BaseRequestrUrl(@"customers/me/password")
  37. //MARK: - 个人中心
  38. #define postLogOut BaseRequestrUrl(@"integration/customer/revoke-customer-token")
  39. #define getSignStateUrl BaseRequestrUrl(@"sign/index")
  40. #define postSignUrl BaseRequestrUrl(@"sign/add")
  41. // MARK: 优惠券/礼品卡
  42. #define getUserCouponUrl BaseRequestrUrl(@"coupon/index")
  43. #define getUserGiftCardUrl BaseRequestrUrl(@"gift/index")
  44. // vip 优惠券
  45. #define getVipCouponUrl BaseRequestrUrl(@"vip/coupon")
  46. #define postAddVipCoupon BaseRequestrUrl(@"coupon/add")
  47. // MARK: 积分
  48. #define getPointsDetailUrl BaseRequestrUrl(@"points/index")
  49. #define getExtraPoints BaseRequestrUrl(@"points/show")
  50. #define postTakeExtraPoints BaseRequestrUrl(@"points/more")
  51. #endif /* ASNetApis_h */