SPSBBusinessManager.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. //
  2. // SPSBBusinessManager.m
  3. // 我的社保
  4. //
  5. // Created by shanp on 2021/4/19.
  6. //
  7. #import "SPSBBusinessManager.h"
  8. #import "SPSBNetworkManager.h"
  9. #import "SPSBShebaoData.h"
  10. #import "SPSBMyPurchaseOrder.h"
  11. #import "SPSBRedDotModel.h"
  12. #import "SPSBFastLoginManager.h"
  13. #import "SPSBGeneralManager.h"
  14. #import "SPSBNotificationDelegateManager.h"
  15. #import <JXHGeneralTools.h>
  16. #import "JXHPhotoManager.h"
  17. #import "SPSBHomeViewButtonsModel.h"
  18. #pragma mark - 数据
  19. static NSArray *_householdRegisterArray;
  20. NSArray *spsb_householdRegisterArray() {
  21. if (!_householdRegisterArray) {
  22. static dispatch_once_t once;
  23. dispatch_once(&once, ^{
  24. _householdRegisterArray = @[@"本地城镇户口", @"本地农村户口", @"外地城镇户口", @"外地农村户口"];
  25. });
  26. }
  27. return _householdRegisterArray;
  28. }
  29. static NSArray *_bankArray;
  30. NSArray *spsb_bankArray() {
  31. if (!_bankArray) {
  32. static dispatch_once_t once;
  33. dispatch_once(&once, ^{
  34. _bankArray = @[@"中国银行",
  35. @"中国工商银行",
  36. @"中国建设银行",
  37. @"招商银行",
  38. @"中国农业银行",
  39. @"交通银行",
  40. @"广发银行",
  41. @"中信银行",
  42. @"平安银行",
  43. @"中国邮政储蓄银行",
  44. @"中国民生银行",
  45. @"兴业银行",
  46. @"中国光大银行",
  47. @"浦发银行",
  48. @"华夏银行"];
  49. });
  50. }
  51. return _bankArray;
  52. }
  53. static NSDictionary *_bankIconDictionary;
  54. NSDictionary *spsb_bankIconDictionary() {
  55. if (!_bankIconDictionary) {
  56. static dispatch_once_t once;
  57. dispatch_once(&once, ^{
  58. _bankIconDictionary = @{@"中国银行": @"zhonghang",
  59. @"中国工商银行": @"gonghang",
  60. @"中国建设银行": @"jianhang",
  61. @"招商银行": @"zhaohang",
  62. @"中国农业银行": @"nonghang",
  63. @"交通银行": @"jiaohang",
  64. @"广发银行": @"guangfa",
  65. @"中信银行": @"zhongxing",
  66. @"平安银行": @"pingan",
  67. @"中国邮政储蓄银行": @"youzheng",
  68. @"中国民生银行": @"minsheng",
  69. @"兴业银行": @"xingye",
  70. @"中国光大银行": @"guangda",
  71. @"浦发银行": @"pufa",
  72. @"华夏银行": @"huaxia"};
  73. });
  74. }
  75. return _bankIconDictionary;
  76. }
  77. static NSDictionary *_alipayBankDictionary;
  78. NSDictionary *spsb_alipayBankDictionary() {
  79. if (!_alipayBankDictionary) {
  80. static dispatch_once_t once;
  81. dispatch_once(&once, ^{
  82. _alipayBankDictionary = @{
  83. @"SRCB": @"深圳农村商业银行",
  84. @"BGB": @"广西北部湾银行",
  85. @"SHRCB": @"上海农村商业银行",
  86. @"BJBANK": @"北京银行",
  87. @"WHCCB": @"威海市商业银行",
  88. @"BOZK": @"周口银行",
  89. @"KORLABANK": @"库尔勒市商业银行",
  90. @"SPABANK": @"平安银行",
  91. @"SDEB": @"顺德农商银行",
  92. @"HURCB": @"湖北省农村信用社",
  93. @"WRCB": @"无锡农村商业银行",
  94. @"BOCY": @"朝阳银行",
  95. @"CZBANK": @"浙商银行",
  96. @"HDBANK": @"邯郸银行",
  97. @"BOC": @"中国银行",
  98. @"BOD": @"东莞银行",
  99. @"CCB": @"中国建设银行",
  100. @"ZYCBANK": @"遵义市商业银行",
  101. @"SXCB": @"绍兴银行",
  102. @"GZRCU": @"贵州省农村信用社",
  103. @"ZJKCCB": @"张家口市商业银行",
  104. @"BOJZ": @"锦州银行",
  105. @"BOP": @"平顶山银行",
  106. @"HKB": @"汉口银行",
  107. @"SPDB": @"上海浦东发展银行",
  108. @"NXRCU": @"宁夏黄河农村商业银行",
  109. @"NYNB": @"广东南粤银行",
  110. @"GRCB": @"广州农商银行",
  111. @"BOSZ": @"苏州银行",
  112. @"HZCB": @"杭州银行",
  113. @"HSBK": @"衡水银行",
  114. @"HBC": @"湖北银行",
  115. @"JXBANK": @"嘉兴银行",
  116. @"HRXJB": @"华融湘江银行",
  117. @"BODD": @"丹东银行",
  118. @"AYCB": @"安阳银行",
  119. @"EGBANK": @"恒丰银行",
  120. @"CDB": @"国家开发银行",
  121. @"TCRCB": @"江苏太仓农村商业银行",
  122. @"NJCB": @"南京银行",
  123. @"ZZBANK": @"郑州银行",
  124. @"DYCB": @"德阳商业银行",
  125. @"YBCCB": @"宜宾市商业银行",
  126. @"SCRCU": @"四川省农村信用",
  127. @"KLB": @"昆仑银行",
  128. @"LSBANK": @"莱商银行",
  129. @"YDRCB": @"尧都农商行",
  130. @"CCQTGB": @"重庆三峡银行",
  131. @"FDB": @"富滇银行",
  132. @"JSRCU": @"江苏省农村信用联合社",
  133. @"JNBANK": @"济宁银行",
  134. @"CMB": @"招商银行",
  135. @"JINCHB": @"晋城银行JCBANK",
  136. @"FXCB": @"阜新银行",
  137. @"WHRCB": @"武汉农村商业银行",
  138. @"HBYCBANK": @"湖北银行宜昌分行",
  139. @"TZCB": @"台州银行",
  140. @"TACCB": @"泰安市商业银行",
  141. @"XCYH": @"许昌银行",
  142. @"CEB": @"中国光大银行",
  143. @"NXBANK": @"宁夏银行",
  144. @"HSBANK": @"徽商银行",
  145. @"JJBANK": @"九江银行",
  146. @"NHQS": @"农信银清算中心",
  147. @"MTBANK": @"浙江民泰商业银行",
  148. @"LANGFB": @"廊坊银行",
  149. @"ASCB": @"鞍山银行",
  150. @"KSRB": @"昆山农村商业银行",
  151. @"YXCCB": @"玉溪市商业银行",
  152. @"DLB": @"大连银行",
  153. @"DRCBCL": @"东莞农村商业银行",
  154. @"GCB": @"广州银行",
  155. @"NBBANK": @"宁波银行",
  156. @"BOYK": @"营口银行",
  157. @"SXRCCU": @"陕西信合",
  158. @"GLBANK": @"桂林银行",
  159. @"BOQH": @"青海银行",
  160. @"CDRCB": @"成都农商银行",
  161. @"QDCCB": @"青岛银行",
  162. @"HKBEA": @"东亚银行",
  163. @"HBHSBANK": @"湖北银行黄石分行",
  164. @"WZCB": @"温州银行",
  165. @"TRCB": @"天津农商银行",
  166. @"QLBANK": @"齐鲁银行",
  167. @"GDRCC": @"广东省农村信用社联合社",
  168. @"ZJTLCB": @"浙江泰隆商业银行",
  169. @"GZB": @"赣州银行",
  170. @"GYCB": @"贵阳市商业银行",
  171. @"CQBANK": @"重庆银行",
  172. @"DAQINGB": @"龙江银行",
  173. @"CGNB": @"南充市商业银行",
  174. @"SCCB": @"三门峡银行",
  175. @"CSRCB": @"常熟农村商业银行",
  176. @"SHBANK": @"上海银行",
  177. @"JLBANK": @"吉林银行",
  178. @"CZRCB": @"常州农村信用联社",
  179. @"BANKWF": @"潍坊银行",
  180. @"ZRCBANK": @"张家港农村商业银行",
  181. @"FJHXBC": @"福建海峡银行",
  182. @"ZJNX": @"浙江省农村信用社联合社",
  183. @"LZYH": @"兰州银行",
  184. @"JSB": @"晋商银行",
  185. @"BOHAIB": @"渤海银行",
  186. @"CZCB": @"浙江稠州商业银行",
  187. @"YQCCB": @"阳泉银行",
  188. @"SJBANK": @"盛京银行",
  189. @"XABANK": @"西安银行",
  190. @"BSB": @"包商银行",
  191. @"JSBANK": @"江苏银行",
  192. @"FSCB": @"抚顺银行",
  193. @"HNRCU": @"河南省农村信用",
  194. @"COMM": @"交通银行",
  195. @"XTB": @"邢台银行",
  196. @"CITIC": @"中信银行",
  197. @"HXBANK": @"华夏银行",
  198. @"HNRCC": @"湖南省农村信用社",
  199. @"DYCCB": @"东营市商业银行",
  200. @"ORBANK": @"鄂尔多斯银行",
  201. @"BJRCB": @"北京农村商业银行",
  202. @"XYBANK": @"信阳银行",
  203. @"ZGCCB": @"自贡市商业银行",
  204. @"CDCB": @"成都银行",
  205. @"HANABANK": @"韩亚银行",
  206. @"CMBC": @"中国民生银行",
  207. @"LYBANK": @"洛阳银行",
  208. @"GDB": @"广东发展银行",
  209. @"ZBCB": @"齐商银行",
  210. @"CBKF": @"开封市商业银行",
  211. @"H3CB": @"内蒙古银行",
  212. @"CIB": @"兴业银行",
  213. @"CRCBANK": @"重庆农村商业银行",
  214. @"SZSBK": @"石嘴山银行",
  215. @"DZBANK": @"德州银行",
  216. @"SRBANK": @"上饶银行",
  217. @"LSCCB": @"乐山市商业银行",
  218. @"JXRCU": @"江西省农村信用",
  219. @"ICBC": @"中国工商银行",
  220. @"JZBANK": @"晋中市商业银行",
  221. @"HZCCB": @"湖州市商业银行",
  222. @"NHB": @"南海农村信用联社",
  223. @"XXBANK": @"新乡银行",
  224. @"JRCB": @"江苏江阴农村商业银行",
  225. @"YNRCC": @"云南省农村信用社",
  226. @"ABC": @"中国农业银行",
  227. @"GXRCU": @"广西省农村信用",
  228. @"PSBC": @"中国邮政储蓄银行",
  229. @"BZMD": @"驻马店银行",
  230. @"ARCU": @"安徽省农村信用社",
  231. @"GSRCU": @"甘肃省农村信用",
  232. @"LYCB": @"辽阳市商业银行",
  233. @"JLRCU": @"吉林农信",
  234. @"URMQCCB": @"乌鲁木齐市商业银行",
  235. @"XLBANK": @"中山小榄村镇银行",
  236. @"CSCB": @"长沙银行",
  237. @"JHBANK": @"金华银行",
  238. @"BHB": @"河北银行",
  239. @"NBYZ": @"鄞州银行",
  240. @"LSBC": @"临商银行",
  241. @"BOCD": @"承德银行",
  242. @"SDRCU": @"山东农信",
  243. @"NCB": @"南昌银行",
  244. @"TCCB": @"天津银行",
  245. @"WJRCB": @"吴江农商银行",
  246. @"CBBQS": @"城市商业银行资金清算中心",
  247. @"HBRCU": @"河北省农村信用社"
  248. };
  249. });
  250. }
  251. return _alipayBankDictionary;
  252. }
  253. NSString *spsb_defaultSupplementaryPayNote() {
  254. return @"请确保补缴月与当前正常参保月连续,并于当前参保月截止时间前支付补缴订单。";
  255. }
  256. NSArray<NSString *> *spsb_getIsPurchaseSSCardArray() {
  257. return @[@"不办卡", @"新办卡(不支持补办)"];
  258. }
  259. #pragma mark - App相关
  260. static bool _spsb_appActive = false;
  261. bool spsb_isAppActive() {
  262. return _spsb_appActive;
  263. }
  264. void spsb_setAppActive(bool active) {
  265. _spsb_appActive = active;
  266. }
  267. static SPSBHomeViewButtonsModel *_spsb_homeViewButtons = nil;
  268. SPSBHomeViewButtonsModel * _Nullable spsb_homeViewButtons(void) {
  269. return _spsb_homeViewButtons;
  270. }
  271. void spsb_setHomeViewButtons(SPSBHomeViewButtonsModel *model) {
  272. _spsb_homeViewButtons = model;
  273. }
  274. static NSArray<SPSBHomeViewADModel *> *_spsb_adsArray = nil;
  275. NSArray<SPSBHomeViewADModel *> *spsb_adsArray() {
  276. if (nil == _spsb_adsArray) return @[];
  277. return _spsb_adsArray;
  278. }
  279. void spsb_setAdsArray(NSArray<SPSBHomeViewADModel *> *array) {
  280. _spsb_adsArray = array;
  281. }
  282. static NSArray<SPSBHomeViewADModel *> *_spsb_policyArray = nil;
  283. NSArray<SPSBHomeViewADModel *> *spsb_policyArray() {
  284. if (nil == _spsb_policyArray) return @[];
  285. return _spsb_policyArray;
  286. }
  287. void spsb_setPolicyArray(NSArray<SPSBHomeViewADModel *> *array) {
  288. _spsb_policyArray = array;
  289. }
  290. static NSString *_spsb_lastCheckPublicDataCity = @"";
  291. NSString *spsb_lastCheckPublicDataCity() {
  292. return _spsb_lastCheckPublicDataCity;
  293. }
  294. void spsb_setLastCheckPublicDataCity(NSString *lastCheckPublicDataCity) {
  295. _spsb_lastCheckPublicDataCity = lastCheckPublicDataCity;
  296. }
  297. static NSString *_spsb_locationCheckPublicDataCity = @"";
  298. NSString *spsb_locationCheckPublicDataCity() {
  299. return _spsb_locationCheckPublicDataCity;
  300. }
  301. void spsb_setLocationCheckPublicDataCity(NSString *locationCheckPublicDataCity) {
  302. _spsb_locationCheckPublicDataCity = locationCheckPublicDataCity;
  303. }
  304. static CLLocationCoordinate2D _spsb_coordinate;
  305. CLLocationCoordinate2D spsb_coordinate() {
  306. return _spsb_coordinate;
  307. }
  308. void spsb_setCoordinate(CLLocationCoordinate2D coordinate) {
  309. _spsb_coordinate = coordinate;
  310. }
  311. static SPSBRedDotModel *_spsb_redDotModel = nil;
  312. SPSBRedDotModel *spsb_redDotModel() {
  313. if (nil == _spsb_redDotModel) return SPSBRedDotModel.new;
  314. return _spsb_redDotModel;
  315. }
  316. void spsb_setRedDotModel(SPSBRedDotModel *redDot) {
  317. _spsb_redDotModel = redDot;
  318. }
  319. NSInteger _spsb_wxpayLimit = 3000;
  320. NSInteger spsb_wxpayLimit() {
  321. return _spsb_wxpayLimit;
  322. }
  323. void spsb_setWxpayLimit(NSInteger wxpayLimit) {
  324. _spsb_wxpayLimit = wxpayLimit;
  325. }
  326. static bool _spsb_isOpenAlbum = false;
  327. void spsb_setIsOpenAlbum(bool isOpenAlbum) {
  328. _spsb_isOpenAlbum = isOpenAlbum;
  329. }
  330. bool spsb_isOpenAlbum() {
  331. return _spsb_isOpenAlbum;
  332. }
  333. #pragma mark - 账号相关
  334. static bool _spsb_isLogin = false;
  335. bool spsb_isLogin() {
  336. return _spsb_isLogin;
  337. }
  338. void spsb_setLogin(bool login) {
  339. _spsb_isLogin = login;
  340. }
  341. static NSString *_spsb_loginToken = @"";
  342. NSString *spsb_loginToken() {
  343. return _spsb_loginToken;
  344. }
  345. void spsb_setLoginToken(NSString *loginToken) {
  346. _spsb_loginToken = loginToken;
  347. }
  348. #pragma mark - 购买社保公积金相关
  349. static SPSBShebaoData *_spsb_shebaoData = nil;
  350. SPSBShebaoData *spsb_shebaoData() {
  351. if (nil == _spsb_shebaoData) return [SPSBShebaoData getModelWithDictionary:@{}];
  352. return _spsb_shebaoData;
  353. }
  354. void spsb_setShebaoData(SPSBShebaoData *_Nullable data) {
  355. _spsb_shebaoData = data;
  356. }
  357. static NSArray<SPSBShebaoData *> *_spsb_shebaoDataArray = nil;
  358. NSArray<SPSBShebaoData *> *spsb_shebaoDataArray() {
  359. if (nil == _spsb_shebaoDataArray) return @[];
  360. return _spsb_shebaoDataArray;
  361. }
  362. void spsb_setShebaoDataArray(NSArray<SPSBShebaoData *> * _Nullable array) {
  363. _spsb_shebaoDataArray = array;
  364. }
  365. static SPSBMyPurchaseOrder *_spsb_myPurchaseOrder = nil;
  366. SPSBMyPurchaseOrder * _Nullable spsb_myPurchaseOrder() {
  367. return _spsb_myPurchaseOrder;
  368. }
  369. void spsb_setMyPurchaseOrder(SPSBMyPurchaseOrder * _Nullable data) {
  370. _spsb_myPurchaseOrder = data;
  371. }
  372. static NSArray *_spsb_selectedCityArray = nil;
  373. NSArray *spsb_selectedCityArray() {
  374. if (nil == _spsb_selectedCityArray) return @[];
  375. return _spsb_selectedCityArray;
  376. }
  377. void spsb_setSelectedCityArray(NSArray *array) {
  378. _spsb_selectedCityArray = array;
  379. }
  380. static NSInteger _spsb_firstYear = 2015;
  381. NSInteger spsb_firstYear() {
  382. return _spsb_firstYear;
  383. }
  384. void spsb_setFirstYear(NSInteger year) {
  385. if (year > 0) {
  386. _spsb_firstYear = year;
  387. }
  388. }
  389. NSString *spsb_changeTimeToNumber(NSString *time) {
  390. NSArray *arr = [time componentsSeparatedByString:@"年"];
  391. NSInteger month = [arr[1] integerValue];
  392. return [NSString stringWithFormat:@"%@%.2ld", arr[0], (long)month];
  393. }
  394. NSString *spsb_changeTime(NSString *time) {
  395. if (time.length > 4) {
  396. NSString *year = [time substringToIndex:4];
  397. NSString *month = [time substringFromIndex:4];
  398. return [NSString stringWithFormat:@"%@年%@月", year, month];
  399. }
  400. return time;
  401. }
  402. #pragma mark - 用户相关
  403. static NSArray<SPSBPurchasersModel *> *_spsb_purchasersArray = nil;
  404. NSArray<SPSBPurchasersModel *> *spsb_purchasersArray() {
  405. if (nil == _spsb_purchasersArray) return @[];
  406. return _spsb_purchasersArray;
  407. }
  408. void spsb_setPurchasersArray(NSArray<SPSBPurchasersModel *> *array) {
  409. _spsb_purchasersArray = array;
  410. }
  411. static NSString *_spsb_avatar = @"";
  412. NSString *spsb_userAvatar() {
  413. return _spsb_avatar;
  414. }
  415. void spsb_setUserAvatar(NSString *avatar) {
  416. _spsb_avatar = avatar;
  417. }
  418. #pragma mark - 相册相关
  419. static bool _publishCanChooseVideo = true;
  420. bool spsb_publishCanChooseVideo() {
  421. return _publishCanChooseVideo;
  422. }
  423. void spsb_setPublishCanChooseVideo(bool can) {
  424. _publishCanChooseVideo = can;
  425. }
  426. static NSUInteger _publishMaxCount = 0;
  427. NSUInteger spsb_publishMaxCount() {
  428. return _publishMaxCount;
  429. }
  430. void spsb_setPublishMaxCount(NSUInteger max) {
  431. _publishMaxCount = max;
  432. }
  433. static NSUInteger _alreadyChosePublishPhoto = 0;
  434. NSUInteger spsb_alreadyChosePublishPhoto() {
  435. return _alreadyChosePublishPhoto;
  436. }
  437. static NSArray<JXHPhotoManager *> *_currentChosePublishPhotos = nil;
  438. NSArray<JXHPhotoManager *> *spsb_currentChosePublishPhotos() {
  439. if (!_currentChosePublishPhotos) {
  440. return spsb_cleanCurrentChosePublishPhotos(0);
  441. }
  442. return _currentChosePublishPhotos;
  443. }
  444. NSArray<JXHPhotoManager *> *spsb_cleanCurrentChosePublishPhotos(NSUInteger alreadyChose) {
  445. _currentChosePublishPhotos = @[];
  446. _alreadyChosePublishPhoto = alreadyChose;
  447. return _currentChosePublishPhotos;
  448. }
  449. void spsb_changeCurrentChosePublishPhotos(JXHPhotoManager *item, NSUInteger index) {
  450. if (!_currentChosePublishPhotos) {
  451. spsb_cleanCurrentChosePublishPhotos(0);
  452. }
  453. if ([_currentChosePublishPhotos containsObject:item]) {
  454. NSMutableArray *temp = [_currentChosePublishPhotos mutableCopy];
  455. [temp removeObject:item];
  456. item.jxh_index = 0;
  457. _currentChosePublishPhotos = [temp copy];
  458. spsb_postNotification(SPSBChoosePublishPhotosNotificationKey, @selector(spsb_currenChosePublishPhotosChanged:chose:), spsb_currenChosePublishPhotosChanged:_currentChosePublishPhotos chose:item);
  459. } else {
  460. if (_currentChosePublishPhotos.count == spsb_publishMaxCount() - spsb_alreadyChosePublishPhoto()) {
  461. UIAlertController *alert = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"你最多只能选择%ld张照片", (long)spsb_publishMaxCount()] message:@"" preferredStyle:UIAlertControllerStyleAlert];
  462. [alert addAction:[UIAlertAction actionWithTitle:@"我知道了" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  463. }]];
  464. [jxh_findPresentedViewControllerStartingFrom(spsb_keyWindow().rootViewController) presentViewController:alert animated:true completion:nil];
  465. return;
  466. }
  467. NSMutableArray *temp = [_currentChosePublishPhotos mutableCopy];
  468. [temp addObject:item];
  469. item.jxh_index = index;
  470. _currentChosePublishPhotos = [temp copy];
  471. spsb_postNotification(SPSBChoosePublishPhotosNotificationKey, @selector(spsb_currenChosePublishPhotosChanged:chose:), spsb_currenChosePublishPhotosChanged:_currentChosePublishPhotos chose:item);
  472. }
  473. }
  474. static SPSBNetworkManager *_globalNetworkManager = nil;
  475. SPSBNetworkManager *spsb_globalNetworkManager() {
  476. if (!_globalNetworkManager) {
  477. static dispatch_once_t once;
  478. dispatch_once(&once, ^{
  479. _globalNetworkManager = SPSBNetworkManager.new;
  480. });
  481. }
  482. return _globalNetworkManager;
  483. }
  484. #pragma mark - 展示相关
  485. NSString *spsb_changeDisplayBankCode(NSString *code) {
  486. if (code.length < 4) {
  487. return @"";
  488. }
  489. return [NSString stringWithFormat:@"**** **** **** %@", [code substringFromIndex:code.length - 4]];
  490. }
  491. #pragma mark - Action
  492. void spsb_needLogin(SPSBFinishLoginBlock finish) {
  493. if (_spsb_isLogin) {
  494. finish();
  495. return;
  496. }
  497. [SPSBFastLoginManager login];
  498. }