From 1a63db696f7e8fd47d783e63d1f04e7b432c3599 Mon Sep 17 00:00:00 2001 From: wangzhaoyao Date: Tue, 11 Oct 2022 11:37:08 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8E=BB=E6=8E=89phone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/MopPlugin.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 3796d83..919c18b 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -78,7 +78,12 @@ static MopPlugin *_instance; } else if ([@"getPhoneNumberResult" isEqualToString:call.method]) { 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 {