// // SPSBURLApiProfile.m // 我的社保 // // Created by shanp on 2021/4/19. // #import "SPSBURLApiProfile.h" #if DEBUG static bool _spsb_isUseDebug = true; void spsb_setIsUseDebug(bool flag) { _spsb_isUseDebug = flag; } bool spsb_isUseDebug(void) { return _spsb_isUseDebug; } #endif NSString *spsb_appUrl(NSString *api) { #ifdef DEBUG if (_spsb_isUseDebug) { return [NSString stringWithFormat:@"http://120.79.211.173/sbl%@", api]; } return [NSString stringWithFormat:@"http://app.wodeshebao.com/sbl%@", api]; #else if (spsb_isTestFlightBuild) { return [NSString stringWithFormat:@"http://120.79.211.173/sbl%@", api]; } return [NSString stringWithFormat:@"http://app.wodeshebao.com/sbl%@", api]; #endif } NSString *spsb_wwwUrl(NSString *api) { #ifdef DEBUG if (_spsb_isUseDebug) { return [NSString stringWithFormat:@"http://120.79.211.173/sbw%@", api]; } return [NSString stringWithFormat:@"http://www.wodeshebao.com/sbw%@", api]; #else if (spsb_isTestFlightBuild) { return [NSString stringWithFormat:@"http://120.79.211.173/sbw%@", api]; } return [NSString stringWithFormat:@"http://www.wodeshebao.com/sbw%@", api]; #endif } NSString *spsb_fileUrl(NSString *api) { if ([api containsString:@"http://"] || [api containsString:@"https://"]) { return api; } #ifdef DEBUG if (_spsb_isUseDebug) { return [NSString stringWithFormat:@"http://120.79.211.173%@", api]; } return [NSString stringWithFormat:@"http://www.wodeshebao.com%@", api]; #else if (spsb_isTestFlightBuild) { return [NSString stringWithFormat:@"http://120.79.211.173%@", api]; } return [NSString stringWithFormat:@"http://www.wodeshebao.com%@", api]; #endif } NSURL *spsb_fileURL(NSString *url) { return [NSURL URLWithString:spsb_fileUrl(url)]; } /** * 公用 COMMON API URI */ #pragma mark - 验证码 CONST_STRING SPSBUrlGetVerifyCode = @"/sms/short/code/v1"; /** * 专用 SheBao API URI */ #pragma mark - 获取版本 CONST_STRING SPSBUrlGetVersion = @"/open/v2"; CONST_STRING SPSBUrlPostDevice = @"/user/device/flag/v1"; CONST_STRING SPSBUrlADSwitch = @"/open/ad/flag/v1"; #pragma mark - 账户相关 //注销 CONST_STRING SPSBUrlCancelAccount = @"/user/reg/del/v1"; //登录 CONST_STRING SPSBUrlLogin = @"/user/login/v2"; //一键登录 CONST_STRING SPSBUrlFastLogin = @"/user/login/fast/v1"; //一键登录自动登录 CONST_STRING SPSBUrlAutoFastLogin = @"/user/login/fast2/v1"; //注册 CONST_STRING SPSBUrlRegister = @"/user/reg/v1"; //找回密码 CONST_STRING SPSBUrlFindbackPassword = @"/user/find/psw/v1"; //更换密码 CONST_STRING SPSBUrlChangePassword = @"/user/change/psw/v1"; //更换手机号码 CONST_STRING SPSBUrlChangePhone = @"/user/change/phone/v1"; //上传头像 CONST_STRING SPSBUrlUploadAvatar = @"/upload/head/v1"; //更新头像 CONST_STRING SPSBUrlUpdateAvatar = @"/user/head/v1"; //消息 CONST_STRING SPSBUrlGetMessageList = @"/user/list/msg/v1"; //红点 CONST_STRING SPSBUrlPersonalPageCount = @"/user/msg/count/v1"; #pragma mark - 购买相关 //获取城市 CONST_STRING SPSBUrlGetCityList = @"/base/list/city/v1"; //获取指定城市正常购买社保数据 CONST_STRING SPSBUrlGetShebaoNormalByCity = @"/shebao/setting/v3"; //获取指定城市补缴社保数据 CONST_STRING SPSBUrlGetShebaoSupplementaryPayByCity = @"/shebao/added/setting/v2"; //获取一键续保数据 CONST_STRING SPSBUrlGetQuickPurchaseData = @"/buy/last_buy/v2"; //获取过往购买过的公积金金额 CONST_STRING SPSBUrlGetFundOfBuyBefore = @"/buy/fund/buyed/v2"; //取消购买订单 CONST_STRING SPSBUrlCancelPurchaseOrder = @"/buy/cancel/v1"; //获取订单金额 CONST_STRING SPSBUrlGetTotalFee = @"/buy/total_fee/v3"; //获取补缴订单金额 CONST_STRING SPSBUrlGetTotalSupplementaryPayFee = @"/buy/added/total_fee/v1"; #pragma mark - 参保人相关 //修改、新增参保人 CONST_STRING SPSBUrlModifyPurchasers = @"/sbu/modify/v2"; //上传身份证 CONST_STRING SPSBUrlUploadIdcardByNumber = @"/upload/card/v1"; CONST_STRING SPSBUrlUploadIdcardById = @"/upload/card/v2"; //删除参保人 CONST_STRING SPSBUrlDeletePurchasers = @"/sbu/delete/v1"; //获取完整参保人 CONST_STRING SPSBUrlGetPurchasers = @"/sbu/get/v1"; //修改参保人手机号码 CONST_STRING SPSBUrlModifyPurchasersPhone = @"/sbu/update/v1"; //修改银行卡 CONST_STRING SPSBUrlModifyBank = @"/sbu/modify/bank/v1"; #pragma mark - 生成订单相关 //生成社保订单 CONST_STRING SPSBUrlCreateShebaoOrder = @"/buy/shebao/v3"; //生成公积金订单 CONST_STRING SPSBUrlCreateFundOrder = @"/buy/fund/v3"; //生成稍后支付订单 CONST_STRING SPSBUrlCreatePayLaterOrder = @"/outbuy/order/v1"; //生成补差额订单 CONST_STRING SPSBUrlCreatePriceDifferencePaymentOrder = @"/added/pay/v2"; //生成社保补缴订单 CONST_STRING SPSBUrlCreateShebaoSupplementaryPayOrder = @"/buy/added/shebao/v2"; //生成公积金补缴订单 CONST_STRING SPSBUrlCreateFundSupplementaryPayOrder = @"/buy/added/fund/v2"; //生成补缴稍后支付订单 CONST_STRING SPSBUrlCreateLaterSupplementaryPayOrder = @"/outbuy/added/v1"; #pragma mark - 支付相关 //查询订单 CONST_STRING SPSBUrlQueryOrder = @"/buy/query/pay/v1"; //退款 CONST_STRING SPSBUrlRefund = @"/order/ask/refund/v1"; #pragma mark - 查询相关 //获取查询城市 CONST_STRING SPSBUrlGetQueryCityList = @"/city/query/v1"; //社保查询 CONST_STRING SPSBUrlQueryShebao = @"/order/shebao/list/v2"; //公积金查询 CONST_STRING SPSBUrlQueryFund = @"/order/fund/list/v2"; //查询补差额和退款情况 CONST_STRING SPSBUrlQueryPriceDifferencePaymentAndRefund = @"/order/repay/refund/v1"; //查询未缴补差额订单数量 CONST_STRING SPSBUrlQueryPriceDifferencePaymentNotPayOrders = @"/added/unpay/v1"; #pragma mark - 订单列表相关 //获取补缴订单列表 CONST_STRING SPSBUrlGetPriceDifferencePaymentList = @"/added/list/v1"; //获取待支付购买订单列表 CONST_STRING SPSBUrlGetWaitForPayList = @"/outbuy/list/v3"; //获取所有购买订单列表 CONST_STRING SPSBUrlGetAllOrderList = @"/buy/list/v3"; //获取转移订单列表 CONST_STRING SPSBUrlGetTransferOrderList = @"/move/list/v1"; #pragma mark - 现金券相关 //现金券查询 CONST_STRING SPSBUrlSearchCashCoupon = @"/couponuser/list/v1"; //获取分享券 CONST_STRING SPSBUrlGetCashCouponShareList = @"/couponuser/share/v1"; //获取可用现金券数量 CONST_STRING SPSBUrlGetCashCouponCount = @"/couponuser/total/v1"; #pragma mark - 转移相关的 //获取转移城市 CONST_STRING SPSBUrlGetTransferCity = @"/move/citys/v1"; //获取转移数据 CONST_STRING SPSBUrlGetTransferCityData = @"/move/setting/v1"; //确认转移 CONST_STRING SPSBUrlCreateTransferOrder = @"/move/v2"; //取消转移订单 CONST_STRING SPSBUrlCancelTransferOrder = @"/move/cancel/v1"; #pragma mark - 待办事项相关 //获取待办事项列表 CONST_STRING SPSBUrlGetMaterialflowList = @"/materialflow/list/v1"; //获取待办事项进度列表 CONST_STRING SPSBUrlGetMaterialflowNodeList = @"/materialflow/node/list/v1"; //上传材料 CONST_STRING SPSBUrlUploadMaterialPhoto = @"/upload/material/v1"; //更新材料上传节点信息 CONST_STRING SPSBUrlUploadMaterialUploadAction = @"/materialflow/node/upload/v1"; //更新材料邮寄节点信息 CONST_STRING SPSBUrlUploadMaterialMailAction = @"/materialflow/node/post/v1"; //更新节点备注信息 CONST_STRING SPSBUrlUploadMemoAction = @"/materialflow/node/memo/v1"; //更新H5填写资料信息 CONST_STRING SPSBUrlUploadH5 = @"/materialflow/node/h5/v1"; //H5页面 CONST_STRING SPSBUrlWaitToDoH5 = @"/info/index/v1"; #pragma mark - 流水相关的 //未完成流水列表 CONST_STRING SPSBUrlUndoneSalaryList = @"/order/wage/list0/v1"; //已完成流水列表 CONST_STRING SPSBUrlDoneSalaryList = @"/order/wage/list1/v1"; //生成流水订单 CONST_STRING SPSBUrlCreateSalaryOrder = @"/order/wage/pay/v1"; #pragma mark - 收货地址相关 //获取收货地址 CONST_STRING SPSBUrlGetMailingAddress = @"/user/address/v1"; //更新(新增)收货地址 CONST_STRING SPSBUrlAddAndUpdateMailingAddress = @"/user/address/edit/v1"; //删除收货地址 CONST_STRING SPSBUrlDeleteMailingAddress = @"/user/address/delete/v1"; #pragma mark - 资讯相关 //获取咨询咨询列表 CONST_STRING SPSBUrlGetArticleList = @"/article/main/v1"; //获取咨询文章 CONST_STRING SPSBUrlGetArticle = @"/article/view/v1?id="; #pragma mark - 咨询相关 //获取留言列表 CONST_STRING SPSBUrlGetFeedbackList = @"/leaveMessage/list/v1"; //新增留言 CONST_STRING SPSBUrlAddFeedback = @"/leaveMessage/add/v1"; //热门问题列表 CONST_STRING SPSBUrlGetHotTopicList = @"/hotTopic/list/v1"; //广播 CONST_STRING SPSBUrlGetBroadcast = @"/hotTopic/broadcast/v1"; #pragma mark - 调查问卷相关 //是否需要调查问卷 CONST_STRING SPSBUrlCheckSurvey = @"/collect/get/question"; //提交调查问卷 CONST_STRING SPSBUrlSaveSurvey = @"/collect/get/question/save"; #pragma mark - H5地址 //我的社保下载链接 CONST_STRING SPSBDownloadLink = @"http://www.wodeshebao.com/flow/download.html"; //为啥要买链接 CONST_STRING SPSBWhyToPayLink = @"http://www.wodeshebao.com/flow2/why.html"; //如何买链接 CONST_STRING SPSBHowToPayLink = @"http://www.wodeshebao.com/flow2/how.html"; //随时查链接 CONST_STRING SPSBQueryAnytimeLink = @"http://www.wodeshebao.com/flow2/when.html"; //正式客服链接 CONST_STRING SPSBServiceOnlineLink = @"http://kf.shanp.com/user.html"; //测试客服链接 CONST_STRING SPSBServiceOnlineDevelopLink = @"http://kf.shanp.com/user.html"; #pragma mark - 支付宝获取银行 CONST_STRING SPSBAlipayGetBank = @"https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardBinCheck=true&cardNo="; //首页社保计算器链接 CONST_STRING SPSBHomeSocialSecurityCalculatorLink = @"https://www.wodeshebao.com/calc/index.html?f=app"; #ifdef DEBUG //补充保险链接 CONST_STRING SPSBOtherSocialSecurityLink = @"http://120.79.211.173/insurance/index.html"; //企业人事服务链接 CONST_STRING SPSBServiceForEnterpriseLink = @"http://www.wodeshebao.com/flow2/en.html"; //社保计算器链接 CONST_STRING SPSBSocialSecurityCalculatorLink = @"http://120.79.211.173/calc/app_index.html?f=iOS"; #else //补充保险链接 CONST_STRING SPSBOtherSocialSecurityLink = @"http://www.wodeshebao.com/insurance/index.html"; //企业人事服务链接 CONST_STRING SPSBServiceForEnterpriseLink = @"http://www.wodeshebao.com/flow2/en.html"; //社保计算器链接 CONST_STRING SPSBSocialSecurityCalculatorLink = @"http://www.wodeshebao.com/calc/app_index.html?f=iOS"; #endif //社保隐私协议链接 CONST_STRING SPSBSocialSecurityPrivacyLink = @"https://www.wodeshebao.com/app_private.html"; //我的社保服务协议 CONST_STRING SPSBSocialSecurityServiceAgreementLink = @"https://www.wodeshebao.com/agreement/shebao.html"; //我的社保代理协议 CONST_STRING SPSBSocialSecurityAgencyAgreementLink = @"https://www.wodeshebao.com/agreement/person.html"; //城市查询 CONST_STRING SPSBSocialSecurityCityServiceLink = @"http://www.wodeshebao.com/cityservice/index.html";