口袋版本的一折买

YZMAEventTool.m 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // YHEventTool.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/11.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMAEventTool.h"
  9. @implementation YZMAEventTool
  10. + (void)eventWithEventType:(NSInteger)type origin:(NSString *)origin category_id:(NSString *)category_id goods_id:(NSString *)goodId source:(NSString *)source {
  11. if (!origin) origin = @"0";
  12. if (!category_id) category_id = @"0";
  13. if (!goodId) goodId = @"";
  14. if (!source){
  15. source = Other;
  16. }
  17. NSString *deviceUUID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
  18. NSLog(@"%@",deviceUUID);
  19. NSDictionary *param = @{@"type":@(type),
  20. @"idfa":deviceUUID,
  21. @"origin":origin,
  22. @"category_id":category_id,
  23. @"goods_id":goodId,
  24. @"path":source
  25. };
  26. NSString *url = [NSString stringWithFormat:@"%@/api/categoryNew/countBuy",BaseURL];
  27. [YZMAHttp post:url params:param success:^(id json) {
  28. NSLog(@"统计计数成功");
  29. } failure:^(NSError *error) {
  30. }];
  31. }
  32. @end