屏蔽 test
parent
fcca7cee56
commit
615b1a3ad7
|
@ -81,7 +81,7 @@ class _MyAppState extends State<MyApp> {
|
||||||
print(res);
|
print(res);
|
||||||
Mop.instance.registerAppletHandler(MyAppletHandler());
|
Mop.instance.registerAppletHandler(MyAppletHandler());
|
||||||
|
|
||||||
// Mop.instance.registerExtensionApi('getUserProfile', getUserProfile);
|
Mop.instance.registerExtensionApi('getUserProfile', getUserProfile);
|
||||||
|
|
||||||
Mop.instance.registerExtensionApi('pushNativePage', pushNativePage);
|
Mop.instance.registerExtensionApi('pushNativePage', pushNativePage);
|
||||||
|
|
||||||
|
|
|
@ -25,29 +25,29 @@
|
||||||
|
|
||||||
- (BOOL)getUserInfoWithAppletInfo:(FATAppletInfo *)appletInfo bindGetUserInfo:(void (^)(NSDictionary *result))bindGetUserInfo
|
- (BOOL)getUserInfoWithAppletInfo:(FATAppletInfo *)appletInfo bindGetUserInfo:(void (^)(NSDictionary *result))bindGetUserInfo
|
||||||
{
|
{
|
||||||
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
// FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
||||||
NSLog(@"getUserInfoWithAppletInfo:%@", channel);
|
// NSLog(@"getUserInfoWithAppletInfo:%@", channel);
|
||||||
[channel invokeMethod:@"extensionApi:getUserInfo" arguments:nil result:^(id _Nullable result) {
|
// [channel invokeMethod:@"extensionApi:getUserInfo" arguments:nil result:^(id _Nullable result) {
|
||||||
NSDictionary *userInfo;
|
// NSDictionary *userInfo;
|
||||||
if (![result isKindOfClass:[NSDictionary class]]) {
|
// if (![result isKindOfClass:[NSDictionary class]]) {
|
||||||
userInfo = @{@"errMsg":@"getUserInfo:fail return value format invalid"};
|
// userInfo = @{@"errMsg":@"getUserInfo:fail return value format invalid"};
|
||||||
} else {
|
// } else {
|
||||||
userInfo = result;
|
// userInfo = result;
|
||||||
}
|
// }
|
||||||
bindGetUserInfo(userInfo);
|
// bindGetUserInfo(userInfo);
|
||||||
}];
|
// }];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)getUserProfileWithAppletInfo:(FATAppletInfo *)appletInfo
|
- (BOOL)getUserProfileWithAppletInfo:(FATAppletInfo *)appletInfo
|
||||||
bindGetUserProfile:(void (^)(NSDictionary *result))bindGetUserProfile
|
bindGetUserProfile:(void (^)(NSDictionary *result))bindGetUserProfile
|
||||||
{
|
{
|
||||||
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
// FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
||||||
[channel invokeMethod:@"extensionApi:getUserProfile"
|
// [channel invokeMethod:@"extensionApi:getUserProfile"
|
||||||
arguments:nil
|
// arguments:nil
|
||||||
result:^(id result) {
|
// result:^(id result) {
|
||||||
bindGetUserProfile ? bindGetUserProfile(result) : nil;
|
// bindGetUserProfile ? bindGetUserProfile(result) : nil;
|
||||||
}];
|
// }];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue