Merge remote-tracking branch 'origin/wechat-login' into wechat-login
commit
0c285e6e5f
|
@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
+ (instancetype)instance;
|
||||
|
||||
@property (nonatomic, copy) void (^bindGetPhoneNumber)(NSDictionary *dic);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -133,6 +133,14 @@ static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme
|
|||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
|
||||
}
|
||||
|
||||
- (void)getPhoneNumberWithAppletInfo:(FATAppletInfo *)appletInfo bindGetPhoneNumber:(void (^)(NSDictionary *))bindGetPhoneNumber {
|
||||
self.bindGetPhoneNumber = bindGetPhoneNumber;
|
||||
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
||||
[channel invokeMethod:@"extensionApi:getPhoneNumber" arguments:@{} result:^(id _Nullable result) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
dic[@"description"]=info.appDescription;
|
||||
dic[@"version"] = info.appVersion;
|
||||
dic[@"thumbnail"]=info.appThumbnail;
|
||||
dic[@"wechatLoginInfo"]=info.wechatLoginInfo;
|
||||
success(dic);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#import "MOPBaseApi.h"
|
||||
#import "MOPApiRequest.h"
|
||||
#import "MOPApiConverter.h"
|
||||
#import "MOPAppletDelegate.h"
|
||||
|
||||
@implementation MopEventStream {
|
||||
FlutterEventSink _eventSink;
|
||||
|
@ -75,6 +76,11 @@ static MopPlugin *_instance;
|
|||
dict[@"path"] = [[FATClient sharedClient] fat_absolutePathWithPath:path];
|
||||
result(dict);
|
||||
}
|
||||
else if ([@"getPhoneNumberResult" isEqualToString:call.method]) {
|
||||
if ([MOPAppletDelegate instance].bindGetPhoneNumber) {
|
||||
[MOPAppletDelegate instance].bindGetPhoneNumber(call.arguments);
|
||||
}
|
||||
}
|
||||
else {
|
||||
MOPApiRequest* request = [[MOPApiRequest alloc] init];
|
||||
request.command = call.method;
|
||||
|
|
Loading…
Reference in New Issue