fix:更新sendCustomEvent方法,新增appId参数
parent
8e8a7a8f65
commit
9a84272f67
|
@ -10,6 +10,7 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface MOP_sendCustomEvent : MOPBaseApi
|
@interface MOP_sendCustomEvent : MOPBaseApi
|
||||||
|
@property (nonatomic, copy)NSString *appId;
|
||||||
@property (nonatomic, strong) NSDictionary *eventData;
|
@property (nonatomic, strong) NSDictionary *eventData;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,24 @@
|
||||||
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!self.appId) {
|
||||||
|
[[FATClient sharedClient].nativeViewManager sendCustomEventWithDetail:self.eventData completion:^(id result, NSError *error) {
|
||||||
|
if (error) {
|
||||||
|
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
||||||
|
} else {
|
||||||
|
success(result);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
} else {
|
||||||
|
[[FATClient sharedClient].nativeViewManager sendCustomEventWithDetail:self.eventData applet:self.appId completion:^(id result, FATError *error) {
|
||||||
|
if (error) {
|
||||||
|
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
||||||
|
} else {
|
||||||
|
success(result);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
[[FATClient sharedClient].nativeViewManager sendCustomEventWithDetail:self.eventData completion:^(id result, NSError *error) {
|
|
||||||
if (error) {
|
|
||||||
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
|
||||||
} else {
|
|
||||||
success(result);
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue