From 50c31400d1d4fe5400c8fc36222b40cf33ee1c76 Mon Sep 17 00:00:00 2001 From: jizelin Date: Thu, 9 Dec 2021 15:18:35 +0800 Subject: [PATCH 01/20] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89master=E5=88=86?= =?UTF-8?q?=E6=94=AF=E4=B8=8Awebrtc=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 296c898..e774594 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -8,7 +8,7 @@ #import "MOP_initialize.h" #import #import -#import +// #import @implementation MOP_initialize @@ -55,7 +55,7 @@ // [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; [[FATClient sharedClient] setEnableLog:YES]; - [FATWebRTCComponent registerComponent]; + // [FATWebRTCComponent registerComponent]; success(@{}); From 8ae1a8e1b4572a335950c9edcc68b62cdf42defa Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 15:26:31 +0800 Subject: [PATCH 02/20] release: version:2.34.9.1 --- ios/mop.podspec | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index cd980c6..cc69ae8 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9' - s.dependency 'FinAppletExt' , '2.34.9' + s.dependency 'FinApplet' , '2.34.9.1' + s.dependency 'FinAppletExt' , '2.34.9.1' end diff --git a/pubspec.yaml b/pubspec.yaml index b4614b0..2bcf0f9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.9' +version: '2.34.9.1' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 3234b7450f40b098178358b3ede79e81a0df51fa Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 15:29:55 +0800 Subject: [PATCH 03/20] release: version:2.34.10 --- ios/mop.podspec | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index cc69ae8..39e03ca 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9.1' - s.dependency 'FinAppletExt' , '2.34.9.1' + s.dependency 'FinApplet' , '2.34.10' + s.dependency 'FinAppletExt' , '2.34.10' end diff --git a/pubspec.yaml b/pubspec.yaml index 2bcf0f9..810d175 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.9.1' +version: '2.34.10' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 844d0331b6f0e1dbecc34d13cb0e7d97bc522495 Mon Sep 17 00:00:00 2001 From: jizelin Date: Thu, 9 Dec 2021 16:02:33 +0800 Subject: [PATCH 04/20] =?UTF-8?q?feat=EF=BC=9A=E4=BF=AE=E6=94=B9sdk?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 39e03ca..cd980c6 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.10' - s.dependency 'FinAppletExt' , '2.34.10' + s.dependency 'FinApplet' , '2.34.9' + s.dependency 'FinAppletExt' , '2.34.9' end From c0cc3c8d9f597ead84643ced9078c27e8957f864 Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 17:26:50 +0800 Subject: [PATCH 05/20] release: version:2.34.10 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index cd980c6..39e03ca 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9' - s.dependency 'FinAppletExt' , '2.34.9' + s.dependency 'FinApplet' , '2.34.10' + s.dependency 'FinAppletExt' , '2.34.10' end From 5773bac161195a33ea71b26e3ce0f869118fbe2e Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 17:48:40 +0800 Subject: [PATCH 06/20] release: version:2.34.10 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 39e03ca..cd980c6 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.10' - s.dependency 'FinAppletExt' , '2.34.10' + s.dependency 'FinApplet' , '2.34.9' + s.dependency 'FinAppletExt' , '2.34.9' end From 4ff040f18535d4d293dede2cbb0a309be335980e Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 18:55:37 +0800 Subject: [PATCH 07/20] release: version:2.34.10.1 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 810d175..0deb4a1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.10' +version: '2.34.10.1' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 4b03b094ad0e68da7dc85151cfed30584c664310 Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 19:06:13 +0800 Subject: [PATCH 08/20] release: version:2.34.8 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 0deb4a1..82db333 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.10.1' +version: '2.34.8' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From a3d03735438af5f92ce9e5565a71412ae66bb5a3 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Mon, 13 Dec 2021 09:19:02 +0800 Subject: [PATCH 09/20] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index aa883af..40d5a09 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.34.9' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211213v01' implementation 'com.finogeeks.mop:plugins:2.34.9' } \ No newline at end of file From a41e4a166ffccb0157be6fcbe5c0e43432c7e3a5 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Thu, 16 Dec 2021 14:36:00 +0800 Subject: [PATCH 10/20] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 40d5a09..b64cbce 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211213v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211216v02' implementation 'com.finogeeks.mop:plugins:2.34.9' } \ No newline at end of file From 8e8187701092505acbc13d2bc17dc1dcf3bbc4fd Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 17 Dec 2021 23:15:36 +0800 Subject: [PATCH 11/20] version++ --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b64cbce..582262a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211216v02' - implementation 'com.finogeeks.mop:plugins:2.34.9' + implementation 'com.finogeeks.lib:finapplet:2.34.11' + implementation 'com.finogeeks.mop:plugins:2.34.11' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 82db333..06b92ea 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.8' +version: '2.34.11' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 18897e7418e72fba0df38fb59094b1bd5b4e28bc Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 17 Dec 2021 23:17:34 +0800 Subject: [PATCH 12/20] release: version:2.34.11 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index cd980c6..637578a 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9' - s.dependency 'FinAppletExt' , '2.34.9' + s.dependency 'FinApplet' , '2.34.11' + s.dependency 'FinAppletExt' , '2.34.11' end From 5ff0e0d5e0ce3e8de2146d260640cf95ec892081 Mon Sep 17 00:00:00 2001 From: jenkins Date: Sat, 18 Dec 2021 14:53:33 +0800 Subject: [PATCH 13/20] version++ --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 582262a..e6a7106 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.34.11' - implementation 'com.finogeeks.mop:plugins:2.34.11' + implementation 'com.finogeeks.lib:finapplet:2.34.12' + implementation 'com.finogeeks.mop:plugins:2.34.12' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 06b92ea..5b1e732 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.11' +version: '2.34.12' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From f9a5f9d07947e2be927d2cf13f3111c852701b56 Mon Sep 17 00:00:00 2001 From: developer Date: Sat, 18 Dec 2021 14:55:32 +0800 Subject: [PATCH 14/20] release: version:2.34.12 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 637578a..4c79944 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.11' - s.dependency 'FinAppletExt' , '2.34.11' + s.dependency 'FinApplet' , '2.34.12' + s.dependency 'FinAppletExt' , '2.34.12' end From 1fca68e124c60c98d879ffe592094d115022fed5 Mon Sep 17 00:00:00 2001 From: hujianhui Date: Wed, 22 Dec 2021 21:03:38 +0800 Subject: [PATCH 15/20] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOPAppletDelegate.m | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index d01d99a..0b0390a 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -9,6 +9,12 @@ #import "MopPlugin.h" #import "MopCustomMenuModel.h" +@interface NSString (FATEncode) +- (NSString *)fat_encodeString; + +@end + + @implementation MOPAppletDelegate + (instancetype)instance @@ -87,6 +93,11 @@ [channel invokeMethod:@"extensionApi:onCustomMenuClick" arguments:arguments result:^(id _Nullable result) { }]; + + if ([@"Desktop" isEqualToString:customMenu.menuId]) { + [self addToDesktopItemClick:appletInfo path:path]; + } + } - (void)clickCustomItemMenuWithInfo:(NSDictionary *)contentInfo completion:(void (^)(FATExtensionCode code, NSDictionary *result))completion { @@ -102,6 +113,12 @@ }]; } +- (void)clickCustomItemMenuWithInfo:(NSDictionary *)contentInfo inApplet:(FATAppletInfo *)appletInfo completion:(void (^)(FATExtensionCode code, NSDictionary *result))completion { + if ([@"Desktop" isEqualToString:contentInfo[@"menuId"]]) { + [self addToDesktopItemClick:appletInfo path:contentInfo[@"path"]]; + } +} + - (void)applet:(NSString *)appletId didOpenCompletion:(NSError *)error { if (!appletId) { return; @@ -113,4 +130,34 @@ }]; } +static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme + +- (void)addToDesktopItemClick:(FATAppletInfo *)appInfo path:(NSString *)path { + NSMutableString *herf = [NSString stringWithFormat:@"%@://applet/appid/%@?", scheme, appInfo.appId].mutableCopy; + NSString *query = [NSString stringWithFormat:@"apiServer=%@&path=%@",appInfo.apiServer, path]; + + if ([appInfo.startParams[@"query"] length]) { + query = [NSString stringWithFormat:@"%@&query=%@",query, appInfo.startParams[@"query"]]; + } + [herf appendString:query.fat_encodeString]; + + NSMutableString *url = [NSMutableString stringWithFormat:@"%@/mop/scattered-page/#/desktopicon", appInfo.apiServer]; + [url appendFormat:@"?iconpath=%@", appInfo.appAvatar]; + [url appendFormat:@"&apptitle=%@", appInfo.appTitle.fat_encodeString]; + [url appendFormat:@"&linkhref=%@", herf]; + + NSLog(@"跳转到中间页面:%@", url); + + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; +} + + +@end + +@implementation NSString (FATEncode) + +- (NSString *)fat_encodeString { + return (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes( NULL, (__bridge CFStringRef)self, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8); +} + @end From 8f21e461922d9054b56f73a88c2113caea362e3e Mon Sep 17 00:00:00 2001 From: hujianhui Date: Fri, 24 Dec 2021 15:02:17 +0800 Subject: [PATCH 16/20] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B7=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E4=B8=8D=E8=83=BD=E8=B7=B3=E8=BD=AC=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=9A=84=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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 3f51f4e..efa087b 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -88,6 +88,11 @@ static MopPlugin *_instance; - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { + if (![FATClient sharedClient].inited) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [[FATClient sharedClient] handleOpenURL:url]; + }); + } return [[FATClient sharedClient] handleOpenURL:url]; } From 48816278078b33d49b9f0e8410d5a992b0c74384 Mon Sep 17 00:00:00 2001 From: hujianhui Date: Mon, 27 Dec 2021 18:22:04 +0800 Subject: [PATCH 17/20] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOPAppletDelegate.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index 0b0390a..4a210d9 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -76,6 +76,9 @@ FATAppletMenuStyle style = [typeString isEqualToString:@"onMiniProgram"] ? FATAppletMenuStyleOnMiniProgram : FATAppletMenuStyleCommon; model.menuType = style; } + if ([@"Desktop" isEqualToString:model.menuId] && FATAppletVersionTypeRelease != appletInfo.appletVersionType) { + continue; + } [models addObject:model]; } From 8837bd5614a103983eff6d7fe8d25149e97fdb69 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Wed, 29 Dec 2021 10:11:50 +0800 Subject: [PATCH 18/20] =?UTF-8?q?add=20=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- .../contents.xcworkspacedata | 2 +- ios/Classes/Api/MOP_qrcodeOpenApplet.h | 18 +++++++++ ios/Classes/Api/MOP_qrcodeOpenApplet.m | 37 +++++++++++++++++++ ios/mop.podspec | 4 +- lib/mop.dart | 5 +++ 6 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 ios/Classes/Api/MOP_qrcodeOpenApplet.h create mode 100644 ios/Classes/Api/MOP_qrcodeOpenApplet.m diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 438deb6..ec9321b 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-11-15 23:44:20.482386","version":"2.2.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-12-29 10:07:33.662750","version":"2.3.0-1.0.pre.169"} \ No newline at end of file diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/ios/Classes/Api/MOP_qrcodeOpenApplet.h b/ios/Classes/Api/MOP_qrcodeOpenApplet.h new file mode 100644 index 0000000..f9fdbf0 --- /dev/null +++ b/ios/Classes/Api/MOP_qrcodeOpenApplet.h @@ -0,0 +1,18 @@ +// +// MOP_scanOpenApplet.h +// mop +// +// Created by beetle_92 on 2021/6/7. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_qrcodeOpenApplet : MOPBaseApi + +@property (nonatomic,copy) NSString *qrcode; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_qrcodeOpenApplet.m b/ios/Classes/Api/MOP_qrcodeOpenApplet.m new file mode 100644 index 0000000..527e5ea --- /dev/null +++ b/ios/Classes/Api/MOP_qrcodeOpenApplet.m @@ -0,0 +1,37 @@ +// +// MOP_scanOpenApplet.m +// mop +// +// Created by beetle_92 on 2021/6/7. +// + +#import "MOP_qrcodeOpenApplet.h" +#import "MOPTools.h" +#import + +@implementation MOP_qrcodeOpenApplet + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel { + NSLog(@"MOP_qrcodeOpenApplet:%@", self.qrcode); + FATAppletQrCodeRequest *qrcodeRequest = [[FATAppletQrCodeRequest alloc] init]; + qrcodeRequest.qrCode = self.qrcode; + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + UIViewController *currentVC = [MOPTools topViewController]; + [[FATClient sharedClient] startAppletWithQrCodeRequest:qrcodeRequest inParentViewController:currentVC requestBlock:^(BOOL result, FATError *error) { + NSLog(@"请求完成:%@", error); + } completion:^(BOOL result, FATError *error) { + NSLog(@"打开完成:%@", error); + if (result){ + success(@{}); + } else { + failure(error.description); + } + } closeCompletion:^{ + NSLog(@"关闭"); + }]; + }); + +} + +@end diff --git a/ios/mop.podspec b/ios/mop.podspec index 4c79944..59e3ab1 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.12' - s.dependency 'FinAppletExt' , '2.34.12' + s.dependency 'FinApplet' , '2.35.0-alpha20211229v02' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211229v02' end diff --git a/lib/mop.dart b/lib/mop.dart index 8c08066..2dd8e92 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -178,6 +178,11 @@ class Mop { return await _channel.invokeMapMethod("scanOpenApplet", params); } + Future qrcodeOpenApplet(String qrcode) async { + Map params = {'qrcode': qrcode}; + return await _channel.invokeMapMethod("qrcodeOpenApplet", params); + } + /// /// 根据微信QrCode信息解析小程序信息 /// From 5826f2ec4f0c2eb519a2f8741d04cbcb3cb569b3 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Wed, 29 Dec 2021 11:15:34 +0800 Subject: [PATCH 19/20] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 2 +- .../finogeeks/mop/api/mop/AppletModule.java | 29 ++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e6a7106..9870b14 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.34.12' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211229v01' implementation 'com.finogeeks.mop:plugins:2.34.12' } \ No newline at end of file diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java index 15a7494..8345e46 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java @@ -5,6 +5,7 @@ import android.text.TextUtils; import android.util.Log; import com.finogeeks.lib.applet.client.FinAppClient; +import com.finogeeks.lib.applet.interfaces.FinCallback; import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; @@ -28,7 +29,7 @@ public class AppletModule extends BaseApi { @Override public String[] apis() { - return new String[]{"openApplet", "scanOpenApplet"}; + return new String[]{"openApplet", "scanOpenApplet","qrcodeOpenApplet"}; } @Override @@ -37,6 +38,8 @@ public class AppletModule extends BaseApi { openApplet(param, callback); } else if ("scanOpenApplet".equals(event)) { scanOpenApplet(param, callback); + } else if ("qrcodeOpenApplet".equals(event)){ + qrcodeOpenApplet(param,callback); } } @@ -109,4 +112,28 @@ public class AppletModule extends BaseApi { FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info)); callback.onSuccess(new HashMap()); } + + private void qrcodeOpenApplet(Map param, ICallback callback){ + String qrcode = String.valueOf(param.get("qrcode")); + FinAppClient.INSTANCE.getAppletApiManager().startAppletByQrcode(mContext, qrcode, new FinCallback() { + @Override + public void onSuccess(String s) { + callback.onSuccess(new HashMap()); + } + + @Override + public void onError(int i, String s) { + callback.onFail(new HashMap(){ + { + put("info",s); + } + }); + } + + @Override + public void onProgress(int i, String s) { + + } + }); + } } From f6f32a97f5c2fc77b8e6de84f61fc5263da8e483 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 29 Dec 2021 17:09:52 +0800 Subject: [PATCH 20/20] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 9870b14..321b774 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211229v01' - implementation 'com.finogeeks.mop:plugins:2.34.12' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211229v09' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file