酷店

KDPGoodDetailVC.m 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. //
  2. // KDPGoodDetailVC.m
  3. // KuDianProject
  4. //
  5. // Created by 学丽 on 2019/7/9.
  6. // Copyright © 2019 KDP. All rights reserved.
  7. //
  8. #import "KDPGoodDetailVC.h"
  9. #import "KDPDetailGoodInformationView.h"
  10. #import "KDPSellingPointView.h"
  11. #import "KDPShopView.h"
  12. #import <WebKit/WebKit.h>
  13. #import "KDPCollectHistoryPageVC.h"
  14. #import "KDPPasteView.h"
  15. #import <AlibcTradeSDK/AlibcTradeSDK.h>
  16. #define goodHeight 496+KDStatusHeight
  17. @interface KDPGoodDetailVC ()<UIScrollViewDelegate,UIWebViewDelegate,WKNavigationDelegate>
  18. {
  19. UIView *bottomView;
  20. UIButton *collectButton;
  21. }
  22. //淘口令页面
  23. @property(nonatomic,strong)KDPPasteView *pasteView;
  24. @property(nonatomic,strong)KDPIDTipView *tipView;
  25. @property(nonatomic,strong)UIScrollView *detailBottonView;
  26. @property(nonatomic,strong)KDPDetailGoodInformationView *infoView;
  27. @property(nonatomic,strong)KDPSellingPointView *pointView;
  28. @property(nonatomic,strong)KDPShopView *shopView;
  29. @property(nonatomic,strong)KDPGoodsModel *detailModel;
  30. @property(nonatomic,strong)WKWebView *detaiWebV;
  31. @end
  32. @implementation KDPGoodDetailVC
  33. - (void)viewDidLoad {
  34. [super viewDidLoad];
  35. [self addDetailUI];
  36. [self addbottomView];
  37. self.infoView.model=self.model;
  38. @try {
  39. [self.detaiWebV removeObserver:self forKeyPath:@"scrollView.contentSize"];
  40. } @catch (NSException *exception) {
  41. }
  42. [self.detaiWebV addObserver:self forKeyPath:@"scrollView.contentSize" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];
  43. [self.detailBottonView addSubview:self.detaiWebV];
  44. [self.detaiWebV mas_makeConstraints:^(MASConstraintMaker *make) {
  45. make.top.mas_equalTo(self.shopView.mas_bottom).offset(40);
  46. make.width.mas_equalTo(SCREEN_WIDTH);
  47. make.left.mas_equalTo(0);
  48. }];
  49. [self getGoodDetail];
  50. [self.view addSubview:self.pasteView];
  51. [self.view addSubview:self.tipView];
  52. [self.tipView mas_makeConstraints:^(MASConstraintMaker *make) {
  53. make.left.top.mas_equalTo(0);
  54. make.width.mas_equalTo(SCREEN_WIDTH);
  55. make.height.mas_equalTo(SCREEN_HEIGHT);
  56. }];
  57. }
  58. - (void)dealloc {
  59. @try{
  60. [self.detaiWebV removeObserver:self forKeyPath:@"scrollView.contentSize"];
  61. }@catch (NSException *exception) {
  62. }
  63. NSLog(@"释放了------------");
  64. }
  65. #pragma mark---商品详情
  66. -(void)getGoodDetail
  67. {
  68. if (self.model.goods_id.length<=0) {
  69. return;
  70. }
  71. [LoadingView show];
  72. [KDPNetworkRequestHTTP postURL:goodDetailURL params:@{@"goods_id":self.model.goods_id} success:^(id _Nonnull json) {
  73. self.detailModel=[KDPGoodsModel yy_modelWithJSON:json[@"data"]];
  74. if (self.detailModel.goods_point.length>0) {
  75. [self good_points];
  76. }
  77. self.infoView.model=self.detailModel;
  78. self.shopView.shopDic=self.detailModel.shop;
  79. [self loadRequestWeb];
  80. [LoadingView dismiss];
  81. [self isCollect];
  82. [self saveHistoryModel:self.detailModel];
  83. } failure:^(NSError * _Nonnull error) {
  84. [LoadingView dismiss];
  85. }];
  86. }
  87. #pragma mark----Web详情
  88. -(void)loadRequestWeb
  89. {
  90. NSURL *url=[NSURL URLWithString:self.detailModel.detail_url];
  91. NSURLRequest *requests=[NSURLRequest requestWithURL:url];
  92. [self.detaiWebV loadRequest:requests];
  93. }
  94. -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context
  95. {
  96. CGFloat heights =[KDPublicMethod getHeightByWidth:SCREEN_WIDTH-40 title:self.detailModel.goods_point font:[UIFont systemFontOfSize:13]];
  97. if ([keyPath isEqualToString:@"scrollView.contentSize"]) {
  98. id height =[change valueForKey:NSKeyValueChangeNewKey];
  99. CGSize size;
  100. [(NSValue *)height getValue:&size];
  101. [self.detaiWebV mas_updateConstraints:^(MASConstraintMaker *make) {
  102. make.height.mas_equalTo(size.height);
  103. }];
  104. self.detailBottonView.contentSize=CGSizeMake(0, size.height+goodHeight+115+heights);
  105. }
  106. }
  107. #pragma mark---赋值。卖点
  108. -(void)good_points
  109. {
  110. CGFloat height =[KDPublicMethod getHeightByWidth:SCREEN_WIDTH-40 title:self.detailModel.goods_point font:[UIFont systemFontOfSize:13]];
  111. self.pointView.point_good =self.detailModel.goods_point;
  112. [self.pointView mas_updateConstraints:^(MASConstraintMaker *make) {
  113. make.top.mas_equalTo(goodHeight);
  114. make.height.mas_equalTo(height+50);
  115. }];
  116. [self.shopView mas_updateConstraints:^(MASConstraintMaker *make) {
  117. make.top.mas_equalTo(self.pointView.mas_bottom);
  118. }];
  119. }
  120. -(void)addbottomView
  121. {
  122. bottomView =[[UIView alloc]initWithFrame:CGRectMake(0, SCREEN_HEIGHT-KDTabBarHeight, SCREEN_WIDTH, KDTabBarHeight)];
  123. bottomView.backgroundColor=[UIColor whiteColor];
  124. [self.view addSubview:bottomView];
  125. collectButton=[[UIButton alloc]initWithFrame:CGRectMake(0, 3, 86, 33)];
  126. collectButton.titleLabel.font=[UIFont systemFontOfSize:10];
  127. [collectButton setTitle:@"收藏" forState:UIControlStateNormal];
  128. [collectButton setImage:[UIImage imageNamed:@"collection_select"] forState:UIControlStateSelected];
  129. [collectButton setTitleColor:[UIColor colorWithHexString:@"#828282"] forState:UIControlStateNormal];
  130. [collectButton setImage:[UIImage imageNamed:@"collection_un"] forState:UIControlStateNormal];
  131. collectButton.adjustsImageWhenHighlighted=NO;
  132. [collectButton setButtonImageTitleStyle:ButtonImageTitleStyleCenterDown padding:3];
  133. [collectButton addTarget:self action:@selector(detailCollectClickButton) forControlEvents:UIControlEventTouchUpInside];
  134. [bottomView addSubview:collectButton];
  135. UIButton *buybutton =[[UIButton alloc]initWithFrame:CGRectMake(collectButton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
  136. [buybutton setTitle:@"购买样品" forState:UIControlStateNormal];
  137. [bottomView addSubview:buybutton];
  138. buybutton.titleLabel.font=[UIFont systemFontOfSize:14];
  139. buybutton.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:(SCREEN_WIDTH-96)/2];
  140. UIButton *getKwaiButton =[[UIButton alloc]initWithFrame:CGRectMake(buybutton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
  141. getKwaiButton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
  142. [getKwaiButton setTitle:@"推广到快手" forState:UIControlStateNormal];
  143. getKwaiButton.titleLabel.font=[UIFont systemFontOfSize:14];
  144. [getKwaiButton addTarget:self action:@selector(kwaiClickButton) forControlEvents:UIControlEventTouchUpInside];
  145. UIBezierPath *maskPaths= [UIBezierPath bezierPathWithRoundedRect:getKwaiButton.bounds byRoundingCorners:UIRectCornerTopRight| UIRectCornerBottomRight cornerRadii:CGSizeMake(19.5, 19.5)];
  146. CAShapeLayer *maskLayers = [[CAShapeLayer alloc] init];
  147. maskLayers.frame = buybutton.bounds;
  148. maskLayers.path = maskPaths.CGPath;
  149. getKwaiButton.layer.mask = maskLayers;
  150. if (![KDPublicMethod JumpOpenURL:KWai]) {//没有安装快手,过审用
  151. buybutton.frame=CGRectMake(collectButton.right, 3, SCREEN_WIDTH-96, 39);
  152. buybutton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
  153. buybutton.layer.cornerRadius=19.5;
  154. buybutton.layer.masksToBounds=YES;
  155. }else{
  156. [bottomView addSubview:getKwaiButton];
  157. [buybutton addTarget:self action:@selector(clickBuyButton) forControlEvents:UIControlEventTouchUpInside];
  158. UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:buybutton.bounds byRoundingCorners:UIRectCornerTopLeft| UIRectCornerBottomLeft cornerRadii:CGSizeMake(19.5, 19.5)];
  159. CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  160. maskLayer.frame = buybutton.bounds;
  161. maskLayer.path = maskPath.CGPath;
  162. buybutton.layer.mask = maskLayer;
  163. }
  164. }
  165. -(void)returnClickBtn
  166. {
  167. [self.navigationController popViewControllerAnimated:YES];
  168. }
  169. -(void)viewWillAppear:(BOOL)animated
  170. {
  171. [super viewWillAppear:animated];
  172. self.navBar.hidden=YES;
  173. [UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleDefault;
  174. self.navigationController.navigationBar.hidden=YES;
  175. self.tabBarController.tabBar.hidden=YES;
  176. }
  177. -(void)viewWillDisappear:(BOOL)animated
  178. {
  179. [super viewWillDisappear:animated];
  180. // self.navBar.hidden=NO;
  181. [LoadingView dismiss];
  182. [UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleLightContent;
  183. self.tabBarController.tabBar.hidden=NO;
  184. }
  185. -(KDPDetailGoodInformationView *)infoView
  186. {
  187. if (!_infoView) {
  188. _infoView=[[KDPDetailGoodInformationView alloc]init];
  189. __weak KDPGoodDetailVC *weakself=self;
  190. _infoView.returnBlock = ^{
  191. [weakself.navigationController popViewControllerAnimated:YES];
  192. };
  193. }
  194. return _infoView;
  195. }
  196. -(KDPShopView *)shopView
  197. {
  198. if (!_shopView) {
  199. _shopView=[[KDPShopView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 70)];
  200. }
  201. return _shopView;
  202. }
  203. -(KDPSellingPointView *)pointView
  204. {
  205. if (!_pointView) {
  206. _pointView=[[KDPSellingPointView alloc]init];
  207. }
  208. return _pointView;
  209. }
  210. -(KDPPasteView *)pasteView
  211. {
  212. if (!_pasteView) {
  213. _pasteView=[[KDPPasteView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
  214. _pasteView.hidden=YES;
  215. }
  216. return _pasteView;
  217. }
  218. -(KDPIDTipView *)tipView
  219. {
  220. if (!_tipView) {
  221. _tipView =[[KDPIDTipView alloc]init];
  222. _tipView.hidden=YES;
  223. }
  224. return _tipView;
  225. }
  226. -(void)addDetailUI
  227. {
  228. self.view.backgroundColor=[UIColor whiteColor];
  229. [self.view addSubview:self.detailBottonView];
  230. [self.detailBottonView addSubview:self.infoView];
  231. [self.detailBottonView addSubview:self.pointView];
  232. [self.detailBottonView addSubview:self.shopView];
  233. [self.detailBottonView mas_makeConstraints:^(MASConstraintMaker *make) {
  234. make.left.right.top.mas_equalTo(0);
  235. make.bottom.mas_equalTo(self.view.mas_bottom).offset(-KDTabBarHeight);
  236. }];
  237. [self.infoView mas_makeConstraints:^(MASConstraintMaker *make) {
  238. make.left.top.mas_equalTo(0);
  239. make.width.mas_equalTo(SCREEN_WIDTH);
  240. make.height.mas_equalTo(goodHeight);
  241. }];
  242. [self.pointView mas_makeConstraints:^(MASConstraintMaker *make) {
  243. make.top.mas_equalTo(self.infoView.mas_bottom);
  244. make.left.mas_equalTo(0);
  245. make.width.mas_equalTo(SCREEN_WIDTH);
  246. make.height.mas_equalTo(0);
  247. }];
  248. [self.shopView mas_makeConstraints:^(MASConstraintMaker *make) {
  249. make.left.mas_equalTo(0);
  250. make.width.mas_equalTo(SCREEN_WIDTH);
  251. make.height.mas_equalTo(75);
  252. make.top.mas_equalTo(self.pointView.mas_bottom);
  253. }];
  254. [self addDetailTitle];
  255. UIButton *returnBtn =[[UIButton alloc]initWithFrame:CGRectMake(15, KDStatusHeight+10, 30, 30)];
  256. returnBtn.layer.cornerRadius=15;
  257. returnBtn.layer.masksToBounds=YES;
  258. [self.view addSubview:returnBtn];
  259. returnBtn.backgroundColor=[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.4];
  260. [returnBtn setImage:[UIImage imageNamed:@"return_white"] forState:UIControlStateNormal];
  261. [returnBtn addTarget:self action:@selector(exitclickButton) forControlEvents:UIControlEventTouchUpInside];
  262. UIButton * collectBtn=[[UIButton alloc]initWithFrame:CGRectMake(self.view.width-47, KDStatusHeight+10, 30, 30)];
  263. [collectBtn setImage:[UIImage imageNamed:@"detail_collection"] forState:UIControlStateNormal];
  264. collectBtn.adjustsImageWhenHighlighted=NO;
  265. [collectBtn addTarget:self action:@selector(collectPageClickSel) forControlEvents:UIControlEventTouchUpInside];
  266. [self.view addSubview:collectBtn];
  267. }
  268. -(void)addDetailTitle
  269. {
  270. UILabel *titleL=[[UILabel alloc]init];
  271. titleL.textColor=[UIColor colorWithHexString:fontColor];
  272. titleL.text=@"———— 商品详情 ————";
  273. titleL.font=[UIFont systemFontOfSize:14];
  274. titleL.textAlignment=NSTextAlignmentCenter;
  275. [self.detailBottonView addSubview:titleL];
  276. [titleL mas_makeConstraints:^(MASConstraintMaker *make) {
  277. make.top.mas_equalTo(self.shopView.mas_bottom);
  278. make.height.mas_equalTo(40);
  279. make.width.mas_equalTo(SCREEN_WIDTH);
  280. make.left.mas_equalTo(0);
  281. }];
  282. }
  283. -(void)exitclickButton
  284. {
  285. [self.navigationController popViewControllerAnimated:YES];
  286. }
  287. -(WKWebView *)detaiWebV
  288. {
  289. if (!_detaiWebV) {
  290. _detaiWebV= [[WKWebView alloc]init];
  291. _detaiWebV.navigationDelegate=self;
  292. _detaiWebV.scrollView.scrollEnabled=NO;
  293. }
  294. return _detaiWebV;
  295. }
  296. -(UIScrollView *)detailBottonView
  297. {
  298. if (!_detailBottonView) {
  299. _detailBottonView=[[UIScrollView alloc]init];
  300. _detailBottonView.delegate=self;
  301. _detailBottonView.backgroundColor=[UIColor whiteColor];
  302. _detailBottonView.showsVerticalScrollIndicator=NO;
  303. if (@available(iOS 11.0, *)) {
  304. _detailBottonView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  305. } else {
  306. self.automaticallyAdjustsScrollViewInsets = NO;
  307. }
  308. _detailBottonView.showsHorizontalScrollIndicator=NO;
  309. _detailBottonView.contentSize=CGSizeMake(0, SCREEN_HEIGHT*2);
  310. }
  311. return _detailBottonView;
  312. }
  313. #pragma mark----收藏
  314. -(void)detailCollectClickButton
  315. {
  316. if (self.detailModel.goods_id.length<=0) {
  317. return;
  318. }
  319. [LoadingView show];
  320. NSString *collect=self.detailModel.is_collect;
  321. if (collect.integerValue == 0) {//收藏
  322. collect=@"1";
  323. }else{
  324. collect=@"0";
  325. }
  326. NSDictionary *param=@{@"is_add":collect,@"goods_id":self.detailModel.goods_id};
  327. [KDPNetworkRequestHTTP postURL:collectURL params:param success:^(id _Nonnull json) {
  328. [LoadingView dismiss];
  329. if ([json[@"flag"] integerValue] == 1) {
  330. [MBProgressHUD showSuccess:@"收藏成功"];
  331. }
  332. self.detailModel.is_collect=collect;
  333. [self isCollect];
  334. } failure:^(NSError * _Nonnull error) {
  335. [LoadingView dismiss];
  336. }];
  337. }
  338. #pragma mark---判断是否收藏
  339. -(void)isCollect
  340. {
  341. if (self.detailModel.is_collect.integerValue == 1) {
  342. collectButton.selected = YES;
  343. }else{
  344. collectButton.selected=NO;
  345. }
  346. }
  347. -(void)collectPageClickSel
  348. {
  349. KDPCollectHistoryPageVC *histT=[[KDPCollectHistoryPageVC alloc]init];
  350. [self.navigationController pushViewController:histT animated:YES];
  351. }
  352. #pragma mark---推广到快手
  353. -(void)kwaiClickButton
  354. {
  355. if (self.detailModel.goods_id.length<=0) {
  356. return;
  357. }
  358. [LoadingView show];
  359. [KDPNetworkRequestHTTP postURL:KwaiJumpURL params:@{@"goods_id":self.detailModel.goods_id} success:^(id _Nonnull json) {
  360. [LoadingView dismiss];
  361. /**
  362. 弹框状态 1:用户没有快手Pid
  363. 2:用户有Pid,首次提示
  364. 3:用户有Pid,二次提示
  365. */
  366. NSDictionary *resultDic=(NSDictionary *)json;
  367. if ([resultDic.allKeys containsObject:@"alert_info"]) {//包括alert_info说明需要提示
  368. [UIView animateWithDuration:1 animations:^{
  369. self.tipView.hidden=NO;
  370. self.tipView.resultDic=json[@"alert_info"];
  371. }];
  372. }else{//直接跳转到快手推广
  373. [KDPublicMethod jumpKwaiWithURL:json[@"data"][@"kwai_url_prime"]];
  374. }
  375. } failure:^(NSError * _Nonnull error) {
  376. [LoadingView dismiss];
  377. }];
  378. }
  379. #pragma mark---购买样品
  380. -(void)clickBuyButton
  381. {
  382. [LoadingView show];
  383. if (self.detailModel.goods_id.length<=0) {
  384. return;
  385. }
  386. [KDPNetworkRequestHTTP postURL:BuyURL params:@{@"goods_id":self.detailModel.goods_id} success:^(id _Nonnull json) {
  387. UIPasteboard * pastboard = [UIPasteboard generalPasteboard];
  388. pastboard.string=json[@"data"][@"tkl"];
  389. if (![KDPublicMethod JumpOpenURL:KWai]) {//没有安装快手,过审用
  390. [self jumpTbWithURL:json[@"data"][@"url"]];
  391. }else{
  392. self.pasteView.pasteLabel.attributedText=[KDPublicMethod sethanggaoWithStr:[NSString stringWithFormat:@"淘口令%@已复制你可以用来分享、购买或推广",json[@"data"][@"tkl"]] linSpacing:5];
  393. self.pasteView.tkl=json[@"data"][@"tkl"];
  394. self.pasteView.hidden=NO;
  395. }
  396. [LoadingView dismiss];
  397. } failure:^(NSError * _Nonnull error) {
  398. [LoadingView dismiss];
  399. }];
  400. }
  401. #pragma mark---跳转淘宝购买
  402. -(void)jumpTbWithURL:(NSString*)url
  403. {
  404. id<AlibcTradePage> page =[AlibcTradePageFactory page:url];
  405. //打开方式
  406. AlibcTradeShowParams* showParam = [[AlibcTradeShowParams alloc] init];
  407. showParam.openType = AlibcOpenTypeAuto;
  408. [[AlibcTradeSDK sharedInstance].tradeService show:self.navigationController page:page showParams:showParam taoKeParams:nil trackParam:nil tradeProcessSuccessCallback:^(AlibcTradeResult * _Nullable result) {
  409. } tradeProcessFailedCallback:^(NSError * _Nullable error) {
  410. }];
  411. }
  412. #pragma mark---添加历史记录
  413. -(void)saveHistoryModel:(KDPGoodsModel *)model
  414. {
  415. NSString *goods_id=@"";
  416. if (model.goods_id.length>0) {
  417. goods_id= model.goods_id;
  418. }
  419. NSString *price=@"";
  420. if (model.price.length>0) {
  421. price = model.price;
  422. }
  423. NSString *img=@"";
  424. if (model.img.length>0) {
  425. img =model.img;
  426. }
  427. NSString *commission_rate=@"";
  428. if (model.commission_rate.length>0) {
  429. commission_rate = model.commission_rate;
  430. }
  431. NSString *commission_price=@"";
  432. if (model.commission_price.length>0) {
  433. commission_price = model.commission_price;
  434. }
  435. NSString *shop_title=@"";
  436. if ([model.shop[@"title"] length]>0) {
  437. shop_title = model.shop[@"title"];
  438. }
  439. NSString *title=@"";
  440. if (model.title.length>0) {
  441. title = model.title;
  442. }
  443. NSString *volume=@"";
  444. if (model.volume.length>0) {
  445. volume = model.volume;
  446. }
  447. NSString *live_price=@"";
  448. if (model.discount_price.length>0) {
  449. live_price = model.discount_price;
  450. }
  451. NSString *shop_type=@"";
  452. if (model.shop_type.length>0) {
  453. shop_type= model.shop_type;
  454. }
  455. NSDictionary *paramDic =@{@"title":title,@"img":img,@"goods_id":goods_id,@"volume":volume,@"shop_type":shop_type,@"shop_title":shop_title,@"price":price,@"commission_rate":commission_rate,@"discount_price":live_price,@"commission_price":commission_price};
  456. [KDPNetworkRequestHTTP postURL:historyURL params:paramDic success:^(id _Nonnull json) {
  457. NSLog(@"%@",json);
  458. } failure:^(NSError * _Nonnull error) {
  459. }];
  460. }
  461. @end