From 9ed0d64632e2799ea871f908fdf6f9c64bb27821 Mon Sep 17 00:00:00 2001 From: hujianhui Date: Mon, 10 Jan 2022 18:13:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A6=96=E6=AC=A1=E6=89=93?= =?UTF-8?q?=E5=BC=80=E4=B8=8D=E8=83=BD=E5=90=AF=E5=8A=A8wenbview=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/MopPlugin.m | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 278ceec..6cef3a3 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -101,10 +101,21 @@ static MopPlugin *_instance; { NSString *string = url.absoluteString; if ([string containsString:@"finclipWebview/url="]) { - FlutterMethodChannel *channel = [[MopPlugin instance] shareMethodChannel]; - [channel invokeMethod:@"shareApi:openURL" arguments:@{@"url":string} result:^(id _Nullable result) { + if (![FATClient sharedClient].inited) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + FlutterMethodChannel *channel = [[MopPlugin instance] shareMethodChannel]; + [channel invokeMethod:@"shareApi:openURL" arguments:@{@"url":string} result:^(id _Nullable result) { + + }]; + }); + } + else { + FlutterMethodChannel *channel = [[MopPlugin instance] shareMethodChannel]; + [channel invokeMethod:@"shareApi:openURL" arguments:@{@"url":string} result:^(id _Nullable result) { + + }]; + } - }]; return YES; }