1.去掉phone

master
wangzhaoyao 2022-10-11 11:37:08 +08:00
parent 8bb7508d76
commit 1a63db696f
1 changed files with 6 additions and 1 deletions

View File

@ -78,7 +78,12 @@ static MopPlugin *_instance;
} }
else if ([@"getPhoneNumberResult" isEqualToString:call.method]) { else if ([@"getPhoneNumberResult" isEqualToString:call.method]) {
if ([MOPAppletDelegate instance].bindGetPhoneNumber) { if ([MOPAppletDelegate instance].bindGetPhoneNumber) {
[MOPAppletDelegate instance].bindGetPhoneNumber(call.arguments); NSDictionary *dic = [[NSDictionary alloc] initWithDictionary:call.arguments];
NSString *jsonString = [dic[@"phone"] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
NSError *error;
NSDictionary *jsonDic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
[MOPAppletDelegate instance].bindGetPhoneNumber(jsonDic);
} }
} }
else { else {