ASNetApis.h 1.9 KB

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