ASNetApis.h 2.3 KB

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