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,7 +15,7 @@
|
||||||
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!self.appId) {
|
||||||
[[FATClient sharedClient].nativeViewManager sendCustomEventWithDetail:self.eventData completion:^(id result, NSError *error) {
|
[[FATClient sharedClient].nativeViewManager sendCustomEventWithDetail:self.eventData completion:^(id result, NSError *error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
failure(@{@"errMsg": @"sendCustomEvent:fail"});
|
||||||
|
@ -23,6 +23,16 @@
|
||||||
success(result);
|
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);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue