猎豆优选

LDShareRequestViewModel.m 868B

123456789101112131415161718192021222324252627
  1. //
  2. // LDShareRequestViewModel.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2019/1/3.
  6. // Copyright © 2019年 kuxuan. All rights reserved.
  7. //
  8. #import "LDShareRequestViewModel.h"
  9. @implementation LDShareRequestViewModel
  10. + (void)requestGoodDetailParamGoods_id:(DetailRequestModel *)requestModel success:(void (^)(LDShareInfoModel *model,NSDictionary *dic))success failure:(void (^)(NSError *))failure {
  11. NSString *urlString = [NSString stringWithFormat:@"%@/api/v2/adzoneCreate/shareCommonGoods", BaseURL];
  12. NSDictionary *para = [requestModel modelToDictionary];
  13. [LDHttp post:urlString params:para success:^(id json) {
  14. LDShareInfoModel *model = [LDShareInfoModel yy_modelWithJSON:json[@"data"]];
  15. NSDictionary *dic = json[@"data"];
  16. success(model,dic);
  17. } failure:^(NSError *error) {
  18. failure(error);
  19. }];
  20. }
  21. @end