SPSBURLApiProfile.m 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. //
  2. // SPSBURLApiProfile.m
  3. // 我的社保
  4. //
  5. // Created by shanp on 2021/4/19.
  6. //
  7. #import "SPSBURLApiProfile.h"
  8. #if DEBUG
  9. static bool _spsb_isUseDebug = true;
  10. void spsb_setIsUseDebug(bool flag) {
  11. _spsb_isUseDebug = flag;
  12. }
  13. bool spsb_isUseDebug(void) {
  14. return _spsb_isUseDebug;
  15. }
  16. #endif
  17. NSString *spsb_appUrl(NSString *api) {
  18. #ifdef DEBUG
  19. if (_spsb_isUseDebug) {
  20. return [NSString stringWithFormat:@"http://120.79.211.173/sbl%@", api];
  21. }
  22. return [NSString stringWithFormat:@"http://app.wodeshebao.com/sbl%@", api];
  23. #else
  24. if (spsb_isTestFlightBuild) {
  25. return [NSString stringWithFormat:@"http://120.79.211.173/sbl%@", api];
  26. }
  27. return [NSString stringWithFormat:@"http://app.wodeshebao.com/sbl%@", api];
  28. #endif
  29. }
  30. NSString *spsb_wwwUrl(NSString *api) {
  31. #ifdef DEBUG
  32. if (_spsb_isUseDebug) {
  33. return [NSString stringWithFormat:@"http://120.79.211.173/sbw%@", api];
  34. }
  35. return [NSString stringWithFormat:@"http://www.wodeshebao.com/sbw%@", api];
  36. #else
  37. if (spsb_isTestFlightBuild) {
  38. return [NSString stringWithFormat:@"http://120.79.211.173/sbw%@", api];
  39. }
  40. return [NSString stringWithFormat:@"http://www.wodeshebao.com/sbw%@", api];
  41. #endif
  42. }
  43. NSString *spsb_fileUrl(NSString *api) {
  44. if ([api containsString:@"http://"] || [api containsString:@"https://"]) {
  45. return api;
  46. }
  47. #ifdef DEBUG
  48. if (_spsb_isUseDebug) {
  49. return [NSString stringWithFormat:@"http://120.79.211.173%@", api];
  50. }
  51. return [NSString stringWithFormat:@"http://www.wodeshebao.com%@", api];
  52. #else
  53. if (spsb_isTestFlightBuild) {
  54. return [NSString stringWithFormat:@"http://120.79.211.173%@", api];
  55. }
  56. return [NSString stringWithFormat:@"http://www.wodeshebao.com%@", api];
  57. #endif
  58. }
  59. NSURL *spsb_fileURL(NSString *url) {
  60. return [NSURL URLWithString:spsb_fileUrl(url)];
  61. }
  62. /**
  63. * 公用 COMMON API URI
  64. */
  65. #pragma mark - 验证码
  66. CONST_STRING SPSBUrlGetVerifyCode = @"/sms/short/code/v1";
  67. /**
  68. * 专用 SheBao API URI
  69. */
  70. #pragma mark - 获取版本
  71. CONST_STRING SPSBUrlGetVersion = @"/open/v2";
  72. CONST_STRING SPSBUrlPostDevice = @"/user/device/flag/v1";
  73. CONST_STRING SPSBUrlADSwitch = @"/open/ad/flag/v1";
  74. #pragma mark - 账户相关
  75. //注销
  76. CONST_STRING SPSBUrlCancelAccount = @"/user/reg/del/v1";
  77. //登录
  78. CONST_STRING SPSBUrlLogin = @"/user/login/v2";
  79. //一键登录
  80. CONST_STRING SPSBUrlFastLogin = @"/user/login/fast/v1";
  81. //一键登录自动登录
  82. CONST_STRING SPSBUrlAutoFastLogin = @"/user/login/fast2/v1";
  83. //注册
  84. CONST_STRING SPSBUrlRegister = @"/user/reg/v1";
  85. //找回密码
  86. CONST_STRING SPSBUrlFindbackPassword = @"/user/find/psw/v1";
  87. //更换密码
  88. CONST_STRING SPSBUrlChangePassword = @"/user/change/psw/v1";
  89. //更换手机号码
  90. CONST_STRING SPSBUrlChangePhone = @"/user/change/phone/v1";
  91. //上传头像
  92. CONST_STRING SPSBUrlUploadAvatar = @"/upload/head/v1";
  93. //更新头像
  94. CONST_STRING SPSBUrlUpdateAvatar = @"/user/head/v1";
  95. //消息
  96. CONST_STRING SPSBUrlGetMessageList = @"/user/list/msg/v1";
  97. //红点
  98. CONST_STRING SPSBUrlPersonalPageCount = @"/user/msg/count/v1";
  99. #pragma mark - 购买相关
  100. //获取城市
  101. CONST_STRING SPSBUrlGetCityList = @"/base/list/city/v1";
  102. //获取指定城市正常购买社保数据
  103. CONST_STRING SPSBUrlGetShebaoNormalByCity = @"/shebao/setting/v3";
  104. //获取指定城市补缴社保数据
  105. CONST_STRING SPSBUrlGetShebaoSupplementaryPayByCity = @"/shebao/added/setting/v2";
  106. //获取一键续保数据
  107. CONST_STRING SPSBUrlGetQuickPurchaseData = @"/buy/last_buy/v2";
  108. //获取过往购买过的公积金金额
  109. CONST_STRING SPSBUrlGetFundOfBuyBefore = @"/buy/fund/buyed/v2";
  110. //取消购买订单
  111. CONST_STRING SPSBUrlCancelPurchaseOrder = @"/buy/cancel/v1";
  112. //获取订单金额
  113. CONST_STRING SPSBUrlGetTotalFee = @"/buy/total_fee/v3";
  114. //获取补缴订单金额
  115. CONST_STRING SPSBUrlGetTotalSupplementaryPayFee = @"/buy/added/total_fee/v1";
  116. #pragma mark - 参保人相关
  117. //修改、新增参保人
  118. CONST_STRING SPSBUrlModifyPurchasers = @"/sbu/modify/v2";
  119. //上传身份证
  120. CONST_STRING SPSBUrlUploadIdcardByNumber = @"/upload/card/v1";
  121. CONST_STRING SPSBUrlUploadIdcardById = @"/upload/card/v2";
  122. //删除参保人
  123. CONST_STRING SPSBUrlDeletePurchasers = @"/sbu/delete/v1";
  124. //获取完整参保人
  125. CONST_STRING SPSBUrlGetPurchasers = @"/sbu/get/v1";
  126. //修改参保人手机号码
  127. CONST_STRING SPSBUrlModifyPurchasersPhone = @"/sbu/update/v1";
  128. //修改银行卡
  129. CONST_STRING SPSBUrlModifyBank = @"/sbu/modify/bank/v1";
  130. #pragma mark - 生成订单相关
  131. //生成社保订单
  132. CONST_STRING SPSBUrlCreateShebaoOrder = @"/buy/shebao/v3";
  133. //生成公积金订单
  134. CONST_STRING SPSBUrlCreateFundOrder = @"/buy/fund/v3";
  135. //生成稍后支付订单
  136. CONST_STRING SPSBUrlCreatePayLaterOrder = @"/outbuy/order/v1";
  137. //生成补差额订单
  138. CONST_STRING SPSBUrlCreatePriceDifferencePaymentOrder = @"/added/pay/v2";
  139. //生成社保补缴订单
  140. CONST_STRING SPSBUrlCreateShebaoSupplementaryPayOrder = @"/buy/added/shebao/v2";
  141. //生成公积金补缴订单
  142. CONST_STRING SPSBUrlCreateFundSupplementaryPayOrder = @"/buy/added/fund/v2";
  143. //生成补缴稍后支付订单
  144. CONST_STRING SPSBUrlCreateLaterSupplementaryPayOrder = @"/outbuy/added/v1";
  145. #pragma mark - 支付相关
  146. //查询订单
  147. CONST_STRING SPSBUrlQueryOrder = @"/buy/query/pay/v1";
  148. //退款
  149. CONST_STRING SPSBUrlRefund = @"/order/ask/refund/v1";
  150. #pragma mark - 查询相关
  151. //获取查询城市
  152. CONST_STRING SPSBUrlGetQueryCityList = @"/city/query/v1";
  153. //社保查询
  154. CONST_STRING SPSBUrlQueryShebao = @"/order/shebao/list/v2";
  155. //公积金查询
  156. CONST_STRING SPSBUrlQueryFund = @"/order/fund/list/v2";
  157. //查询补差额和退款情况
  158. CONST_STRING SPSBUrlQueryPriceDifferencePaymentAndRefund = @"/order/repay/refund/v1";
  159. //查询未缴补差额订单数量
  160. CONST_STRING SPSBUrlQueryPriceDifferencePaymentNotPayOrders = @"/added/unpay/v1";
  161. #pragma mark - 订单列表相关
  162. //获取补缴订单列表
  163. CONST_STRING SPSBUrlGetPriceDifferencePaymentList = @"/added/list/v1";
  164. //获取待支付购买订单列表
  165. CONST_STRING SPSBUrlGetWaitForPayList = @"/outbuy/list/v3";
  166. //获取所有购买订单列表
  167. CONST_STRING SPSBUrlGetAllOrderList = @"/buy/list/v3";
  168. //获取转移订单列表
  169. CONST_STRING SPSBUrlGetTransferOrderList = @"/move/list/v1";
  170. #pragma mark - 现金券相关
  171. //现金券查询
  172. CONST_STRING SPSBUrlSearchCashCoupon = @"/couponuser/list/v1";
  173. //获取分享券
  174. CONST_STRING SPSBUrlGetCashCouponShareList = @"/couponuser/share/v1";
  175. //获取可用现金券数量
  176. CONST_STRING SPSBUrlGetCashCouponCount = @"/couponuser/total/v1";
  177. #pragma mark - 转移相关的
  178. //获取转移城市
  179. CONST_STRING SPSBUrlGetTransferCity = @"/move/citys/v1";
  180. //获取转移数据
  181. CONST_STRING SPSBUrlGetTransferCityData = @"/move/setting/v1";
  182. //确认转移
  183. CONST_STRING SPSBUrlCreateTransferOrder = @"/move/v2";
  184. //取消转移订单
  185. CONST_STRING SPSBUrlCancelTransferOrder = @"/move/cancel/v1";
  186. #pragma mark - 待办事项相关
  187. //获取待办事项列表
  188. CONST_STRING SPSBUrlGetMaterialflowList = @"/materialflow/list/v1";
  189. //获取待办事项进度列表
  190. CONST_STRING SPSBUrlGetMaterialflowNodeList = @"/materialflow/node/list/v1";
  191. //上传材料
  192. CONST_STRING SPSBUrlUploadMaterialPhoto = @"/upload/material/v1";
  193. //更新材料上传节点信息
  194. CONST_STRING SPSBUrlUploadMaterialUploadAction = @"/materialflow/node/upload/v1";
  195. //更新材料邮寄节点信息
  196. CONST_STRING SPSBUrlUploadMaterialMailAction = @"/materialflow/node/post/v1";
  197. //更新节点备注信息
  198. CONST_STRING SPSBUrlUploadMemoAction = @"/materialflow/node/memo/v1";
  199. //更新H5填写资料信息
  200. CONST_STRING SPSBUrlUploadH5 = @"/materialflow/node/h5/v1";
  201. //H5页面
  202. CONST_STRING SPSBUrlWaitToDoH5 = @"/info/index/v1";
  203. #pragma mark - 流水相关的
  204. //未完成流水列表
  205. CONST_STRING SPSBUrlUndoneSalaryList = @"/order/wage/list0/v1";
  206. //已完成流水列表
  207. CONST_STRING SPSBUrlDoneSalaryList = @"/order/wage/list1/v1";
  208. //生成流水订单
  209. CONST_STRING SPSBUrlCreateSalaryOrder = @"/order/wage/pay/v1";
  210. #pragma mark - 收货地址相关
  211. //获取收货地址
  212. CONST_STRING SPSBUrlGetMailingAddress = @"/user/address/v1";
  213. //更新(新增)收货地址
  214. CONST_STRING SPSBUrlAddAndUpdateMailingAddress = @"/user/address/edit/v1";
  215. //删除收货地址
  216. CONST_STRING SPSBUrlDeleteMailingAddress = @"/user/address/delete/v1";
  217. #pragma mark - 资讯相关
  218. //获取咨询咨询列表
  219. CONST_STRING SPSBUrlGetArticleList = @"/article/main/v1";
  220. //获取咨询文章
  221. CONST_STRING SPSBUrlGetArticle = @"/article/view/v1?id=";
  222. #pragma mark - 咨询相关
  223. //获取留言列表
  224. CONST_STRING SPSBUrlGetFeedbackList = @"/leaveMessage/list/v1";
  225. //新增留言
  226. CONST_STRING SPSBUrlAddFeedback = @"/leaveMessage/add/v1";
  227. //热门问题列表
  228. CONST_STRING SPSBUrlGetHotTopicList = @"/hotTopic/list/v1";
  229. //广播
  230. CONST_STRING SPSBUrlGetBroadcast = @"/hotTopic/broadcast/v1";
  231. #pragma mark - 调查问卷相关
  232. //是否需要调查问卷
  233. CONST_STRING SPSBUrlCheckSurvey = @"/collect/get/question";
  234. //提交调查问卷
  235. CONST_STRING SPSBUrlSaveSurvey = @"/collect/get/question/save";
  236. #pragma mark - H5地址
  237. //我的社保下载链接
  238. CONST_STRING SPSBDownloadLink = @"http://www.wodeshebao.com/flow/download.html";
  239. //为啥要买链接
  240. CONST_STRING SPSBWhyToPayLink = @"http://www.wodeshebao.com/flow2/why.html";
  241. //如何买链接
  242. CONST_STRING SPSBHowToPayLink = @"http://www.wodeshebao.com/flow2/how.html";
  243. //随时查链接
  244. CONST_STRING SPSBQueryAnytimeLink = @"http://www.wodeshebao.com/flow2/when.html";
  245. //正式客服链接
  246. CONST_STRING SPSBServiceOnlineLink = @"http://kf.shanp.com/user.html";
  247. //测试客服链接
  248. CONST_STRING SPSBServiceOnlineDevelopLink = @"http://kf.shanp.com/user.html";
  249. #pragma mark - 支付宝获取银行
  250. CONST_STRING SPSBAlipayGetBank = @"https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardBinCheck=true&cardNo=";
  251. //首页社保计算器链接
  252. CONST_STRING SPSBHomeSocialSecurityCalculatorLink = @"https://www.wodeshebao.com/calc/index.html?f=app";
  253. #ifdef DEBUG
  254. //补充保险链接
  255. CONST_STRING SPSBOtherSocialSecurityLink = @"http://120.79.211.173/insurance/index.html";
  256. //企业人事服务链接
  257. CONST_STRING SPSBServiceForEnterpriseLink = @"http://www.wodeshebao.com/flow2/en.html";
  258. //社保计算器链接
  259. CONST_STRING SPSBSocialSecurityCalculatorLink = @"http://120.79.211.173/calc/app_index.html?f=iOS";
  260. #else
  261. //补充保险链接
  262. CONST_STRING SPSBOtherSocialSecurityLink = @"http://www.wodeshebao.com/insurance/index.html";
  263. //企业人事服务链接
  264. CONST_STRING SPSBServiceForEnterpriseLink = @"http://www.wodeshebao.com/flow2/en.html";
  265. //社保计算器链接
  266. CONST_STRING SPSBSocialSecurityCalculatorLink = @"http://www.wodeshebao.com/calc/app_index.html?f=iOS";
  267. #endif
  268. //社保隐私协议链接
  269. CONST_STRING SPSBSocialSecurityPrivacyLink = @"https://www.wodeshebao.com/app_private.html";
  270. //我的社保服务协议
  271. CONST_STRING SPSBSocialSecurityServiceAgreementLink = @"https://www.wodeshebao.com/agreement/shebao.html";
  272. //我的社保代理协议
  273. CONST_STRING SPSBSocialSecurityAgencyAgreementLink = @"https://www.wodeshebao.com/agreement/person.html";
  274. //城市查询
  275. CONST_STRING SPSBSocialSecurityCityServiceLink = @"http://www.wodeshebao.com/cityservice/index.html";