微信登录
parent
e1941bd839
commit
6fb0b84b3d
|
@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
+ (instancetype)instance;
|
+ (instancetype)instance;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) void (^bindGetPhoneNumber)(NSDictionary *dic);
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -133,6 +133,14 @@ static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme
|
||||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
|
[[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
|
@end
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
dic[@"description"]=info.appDescription;
|
dic[@"description"]=info.appDescription;
|
||||||
dic[@"version"] = info.appVersion;
|
dic[@"version"] = info.appVersion;
|
||||||
dic[@"thumbnail"]=info.appThumbnail;
|
dic[@"thumbnail"]=info.appThumbnail;
|
||||||
|
dic[@"wechatLoginInfo"]=info.wechatLoginInfo;
|
||||||
success(dic);
|
success(dic);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#import "MOPBaseApi.h"
|
#import "MOPBaseApi.h"
|
||||||
#import "MOPApiRequest.h"
|
#import "MOPApiRequest.h"
|
||||||
#import "MOPApiConverter.h"
|
#import "MOPApiConverter.h"
|
||||||
|
#import "MOPAppletDelegate.h"
|
||||||
|
|
||||||
@implementation MopEventStream {
|
@implementation MopEventStream {
|
||||||
FlutterEventSink _eventSink;
|
FlutterEventSink _eventSink;
|
||||||
|
@ -75,6 +76,11 @@ static MopPlugin *_instance;
|
||||||
dict[@"path"] = [[FATClient sharedClient] fat_absolutePathWithPath:path];
|
dict[@"path"] = [[FATClient sharedClient] fat_absolutePathWithPath:path];
|
||||||
result(dict);
|
result(dict);
|
||||||
}
|
}
|
||||||
|
else if ([@"getPhoneNumberResult" isEqualToString:call.method]) {
|
||||||
|
if ([MOPAppletDelegate instance].bindGetPhoneNumber) {
|
||||||
|
[MOPAppletDelegate instance].bindGetPhoneNumber(call.arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
MOPApiRequest* request = [[MOPApiRequest alloc] init];
|
MOPApiRequest* request = [[MOPApiRequest alloc] init];
|
||||||
request.command = call.method;
|
request.command = call.method;
|
||||||
|
|
Loading…
Reference in New Issue