屏蔽 test

phi_2.44.5.1
Sean 2024-06-17 09:54:16 +08:00
parent fcca7cee56
commit 615b1a3ad7
2 changed files with 18 additions and 18 deletions

View File

@ -81,7 +81,7 @@ class _MyAppState extends State<MyApp> {
print(res);
Mop.instance.registerAppletHandler(MyAppletHandler());
// Mop.instance.registerExtensionApi('getUserProfile', getUserProfile);
Mop.instance.registerExtensionApi('getUserProfile', getUserProfile);
Mop.instance.registerExtensionApi('pushNativePage', pushNativePage);

View File

@ -25,29 +25,29 @@
- (BOOL)getUserInfoWithAppletInfo:(FATAppletInfo *)appletInfo bindGetUserInfo:(void (^)(NSDictionary *result))bindGetUserInfo
{
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
NSLog(@"getUserInfoWithAppletInfo:%@", channel);
[channel invokeMethod:@"extensionApi:getUserInfo" arguments:nil result:^(id _Nullable result) {
NSDictionary *userInfo;
if (![result isKindOfClass:[NSDictionary class]]) {
userInfo = @{@"errMsg":@"getUserInfo:fail return value format invalid"};
} else {
userInfo = result;
}
bindGetUserInfo(userInfo);
}];
// FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
// NSLog(@"getUserInfoWithAppletInfo:%@", channel);
// [channel invokeMethod:@"extensionApi:getUserInfo" arguments:nil result:^(id _Nullable result) {
// NSDictionary *userInfo;
// if (![result isKindOfClass:[NSDictionary class]]) {
// userInfo = @{@"errMsg":@"getUserInfo:fail return value format invalid"};
// } else {
// userInfo = result;
// }
// bindGetUserInfo(userInfo);
// }];
return YES;
}
- (BOOL)getUserProfileWithAppletInfo:(FATAppletInfo *)appletInfo
bindGetUserProfile:(void (^)(NSDictionary *result))bindGetUserProfile
{
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
[channel invokeMethod:@"extensionApi:getUserProfile"
arguments:nil
result:^(id result) {
bindGetUserProfile ? bindGetUserProfile(result) : nil;
}];
// FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
// [channel invokeMethod:@"extensionApi:getUserProfile"
// arguments:nil
// result:^(id result) {
// bindGetUserProfile ? bindGetUserProfile(result) : nil;
// }];
return YES;
}