12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //
- // KBEventTool.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/5/11.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "KBEventTool.h"
- @implementation KBEventTool
- + (void)eventWithEventType:(NSInteger)type origin:(NSString *)origin category_id:(NSString *)category_id goods_id:(NSString *)goodId source:(NSString *)source {
-
- if (!origin) origin = @"0";
- if (!category_id) category_id = @"0";
- if (!goodId) goodId = @"";
- if (!source){
- source = Other;
- }
-
- NSString *deviceUUID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
-
- NSLog(@"%@",deviceUUID);
-
- NSDictionary *param = @{@"type":@(type),
- @"idfa":deviceUUID,
- @"origin":origin,
- @"category_id":category_id,
- @"goods_id":goodId,
- @"path":source
- };
-
- NSString *url = [NSString stringWithFormat:@"%@/api/categoryNew/countBuy",BaseURL];
- [KBHttp post:url params:param success:^(id json) {
-
- NSLog(@"统计计数成功");
-
- } failure:^(NSError *error) {
-
- }];
-
- }
- @end
|