From 6fdf55e2f1c628804dcfc4897c1f0e8fafd64264 Mon Sep 17 00:00:00 2001 From: developer Date: Wed, 16 Jun 2021 22:54:56 +0800 Subject: [PATCH 01/11] release: version:2.29.3 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index b4fad09..e5963b2 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.29.1' - s.dependency 'FinAppletExt' , '2.29.1' + s.dependency 'FinApplet' , '2.29.3' + s.dependency 'FinAppletExt' , '2.29.3' end From e34780f3e093a89194c0942ef4bffba73c4f39ec Mon Sep 17 00:00:00 2001 From: jizelin Date: Fri, 11 Jun 2021 18:57:54 +0800 Subject: [PATCH 02/11] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E6=89=AB?= =?UTF-8?q?=E7=A0=81=E6=89=93=E5=BC=80=E4=B8=8D=E5=90=8C=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 10 +++++----- ios/Classes/Api/MOP_scanOpenApplet.h | 2 ++ ios/Classes/Api/MOP_scanOpenApplet.m | 14 +++++++++++++- lib/mop.dart | 3 ++- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 82f3b4b..c16385a 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/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-06-02 15:20:44.412374","version":"2.3.0-1.0.pre.169"} \ 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/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-06-09 21:47:48.185375","version":"2.0.3"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 37d6b64..c46bddd 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.6.0" + version: "2.5.0" boolean_selector: dependency: transitive description: @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "2.28.1" + version: "2.29.3" path: dependency: transitive description: @@ -106,7 +106,7 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" + version: "1.8.0" stack_trace: dependency: transitive description: @@ -141,7 +141,7 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" + version: "0.2.19" typed_data: dependency: transitive description: @@ -157,5 +157,5 @@ packages: source: hosted version: "2.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.12.0-0.0 <3.0.0" flutter: ">=1.10.0" diff --git a/ios/Classes/Api/MOP_scanOpenApplet.h b/ios/Classes/Api/MOP_scanOpenApplet.h index d6e423b..797e68d 100644 --- a/ios/Classes/Api/MOP_scanOpenApplet.h +++ b/ios/Classes/Api/MOP_scanOpenApplet.h @@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_scanOpenApplet : MOPBaseApi +@property (nonatomic,copy) NSString *info; + @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_scanOpenApplet.m b/ios/Classes/Api/MOP_scanOpenApplet.m index 86e0631..2d6e543 100644 --- a/ios/Classes/Api/MOP_scanOpenApplet.m +++ b/ios/Classes/Api/MOP_scanOpenApplet.m @@ -6,12 +6,24 @@ // #import "MOP_scanOpenApplet.h" +#import "MOPTools.h" #import @implementation MOP_scanOpenApplet - (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel { - NSLog(@"MOP_scanOpenApplet"); + NSLog(@"MOP_scanOpenApplet:%@", self.info); + FATAppletDecryptRequest *req = [[FATAppletDecryptRequest alloc] init]; + req.info = self.info; + UIViewController *currentVC = [MOPTools topViewController]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [[FATClient sharedClient] startAppletWithDecryptRequest:req InParentViewController:currentVC completion:^(BOOL result, FATError *error) { + NSLog(@"打开小程序:%@", error); + } closeCompletion:^{ + NSLog(@"关闭小程序"); + }]; + }); + } @end diff --git a/lib/mop.dart b/lib/mop.dart index fd8aa9e..0b30f08 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -161,7 +161,8 @@ class Mop { /// (扫码后)解密-鉴权-打开小程序 /// Future scanOpenApplet(String info) async { - return await _channel.invokeMapMethod("scanOpenApplet"); + Map params = {'info': info}; + return await _channel.invokeMapMethod("scanOpenApplet", params); } /// From 17f30aec6f011d5eaee7bcaabcb1ad5a83e53c20 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 15 Jun 2021 20:12:27 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E6=9C=BA=E5=88=B6=EF=BC=8C=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E4=BD=93=E9=AA=8C=E7=89=88=E3=80=81=E4=B8=B4=E6=97=B6=E7=89=88?= 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 | 26 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 15097d6..29275b4 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.29.3' + implementation 'com.finogeeks.lib:finapplet:2.30.0-alpha20210615v04' implementation 'com.finogeeks.mop:plugins:2.29.3' } \ 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 b35821e..0a14ff9 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 @@ -1,9 +1,11 @@ package com.finogeeks.mop.api.mop; import android.content.Context; +import android.text.TextUtils; import android.util.Log; import com.finogeeks.lib.applet.client.FinAppClient; +import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; @@ -26,11 +28,19 @@ public class AppletModule extends BaseApi { @Override public String[] apis() { - return new String[]{"openApplet"}; + return new String[]{"openApplet", "scanOpenApplet"}; } @Override public void invoke(String event, Map param, ICallback callback) { + if ("openApplet".equals(event)) { + openApplet(param, callback); + } else if ("scanOpenApplet".equals(event)) { + scanOpenApplet(param, callback); + } + } + + private void openApplet(Map param, ICallback callback) { if (param.get("appId") == null) { callback.onFail(new HashMap() { { @@ -89,4 +99,18 @@ public class AppletModule extends BaseApi { // } callback.onSuccess(new HashMap()); } + + private void scanOpenApplet(Map param, ICallback callback) { + String info = String.valueOf(param.get("info")); + if (TextUtils.isEmpty(info)) { + callback.onFail(new HashMap() { + { + put("info", "info不能为" + info); + } + }); + return; + } + FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info)); + callback.onSuccess(new HashMap()); + } } From edcd7fead1e6338ac4fb9ff3129c32cd9a3d5baf Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 15 Jun 2021 23:50:26 +0800 Subject: [PATCH 04/11] Update finapplet version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 29275b4..58365f9 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.30.0-alpha20210615v04' - implementation 'com.finogeeks.mop:plugins:2.29.3' + implementation 'com.finogeeks.lib:finapplet:2.30.0-alpha20210615v05' + implementation 'com.finogeeks.mop:plugins:2.30.0-alpha20210615v02' } \ No newline at end of file From 3bfe5eb545c604edfb2e22d4c067a03478841c48 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 16 Jun 2021 23:12:53 +0800 Subject: [PATCH 05/11] Update finapplet version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 58365f9..ffbe445 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.30.0-alpha20210615v05' + implementation 'com.finogeeks.lib:finapplet:2.30.0-alpha20210616v04' implementation 'com.finogeeks.mop:plugins:2.30.0-alpha20210615v02' } \ No newline at end of file From bf84d64d64c4434d77fe112d1db390c650df7c42 Mon Sep 17 00:00:00 2001 From: jizelin Date: Wed, 16 Jun 2021 23:47:00 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E5=90=8E=E6=89=93=E5=BC=80=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=EF=BC=8C=E5=B0=9D=E8=AF=95=E8=A7=A3=E5=86=B3=E6=9C=89?= =?UTF-8?q?=E6=97=B6=E6=89=93=E4=B8=8D=E5=BC=80=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- ios/Classes/Api/MOP_scanOpenApplet.m | 4 ++-- ios/mop.podspec | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index c16385a..46ad415 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-06-09 21:47:48.185375","version":"2.0.3"} \ 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/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-06-15 22:42:21.602758","version":"2.0.3"} \ No newline at end of file diff --git a/ios/Classes/Api/MOP_scanOpenApplet.m b/ios/Classes/Api/MOP_scanOpenApplet.m index 2d6e543..3b29310 100644 --- a/ios/Classes/Api/MOP_scanOpenApplet.m +++ b/ios/Classes/Api/MOP_scanOpenApplet.m @@ -15,8 +15,8 @@ NSLog(@"MOP_scanOpenApplet:%@", self.info); FATAppletDecryptRequest *req = [[FATAppletDecryptRequest alloc] init]; req.info = self.info; - UIViewController *currentVC = [MOPTools topViewController]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + UIViewController *currentVC = [MOPTools topViewController]; [[FATClient sharedClient] startAppletWithDecryptRequest:req InParentViewController:currentVC completion:^(BOOL result, FATError *error) { NSLog(@"打开小程序:%@", error); } closeCompletion:^{ diff --git a/ios/mop.podspec b/ios/mop.podspec index c0aefcf..146a88c 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.30.0-alpha20210611v01' - s.dependency 'FinAppletExt' , '2.30.0-alpha20210611v01' + s.dependency 'FinApplet' , '2.30.0-alpha20210615v09' + s.dependency 'FinAppletExt' , '2.30.0-alpha20210615v09' end From 4bc8592e2c6b2831b1108e90e5b09814cb791e22 Mon Sep 17 00:00:00 2001 From: jizelin Date: Wed, 16 Jun 2021 23:52:29 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?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 146a88c..0320a82 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.30.0-alpha20210615v09' - s.dependency 'FinAppletExt' , '2.30.0-alpha20210615v09' + s.dependency 'FinApplet' , '2.30.0-alpha20210616v09' + s.dependency 'FinAppletExt' , '2.30.0-alpha20210616v09' end From 694738d5838e8a781f77d749a618d713b1de521f Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 17 Jun 2021 09:38:06 +0800 Subject: [PATCH 08/11] release: version:2.29.3 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index b4fad09..e5963b2 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.29.1' - s.dependency 'FinAppletExt' , '2.29.1' + s.dependency 'FinApplet' , '2.29.3' + s.dependency 'FinAppletExt' , '2.29.3' end From 46571f6017d27356d9b0f8938b06e72f457d9721 Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 17 Jun 2021 12:13:22 +0800 Subject: [PATCH 09/11] release: version:2.29.3 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index b4fad09..e5963b2 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.29.1' - s.dependency 'FinAppletExt' , '2.29.1' + s.dependency 'FinApplet' , '2.29.3' + s.dependency 'FinAppletExt' , '2.29.3' end From a0a781405a8260148557ed1db57ffec1c76a656a Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 17 Jun 2021 15:07:09 +0800 Subject: [PATCH 10/11] release: version:2.29.3 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index b4fad09..e5963b2 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.29.1' - s.dependency 'FinAppletExt' , '2.29.1' + s.dependency 'FinApplet' , '2.29.3' + s.dependency 'FinAppletExt' , '2.29.3' end From 660a2d02a3420f192936147d7d5499c4e35795c4 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 18 Jun 2021 20:14:20 +0800 Subject: [PATCH 11/11] release: version:2.29.3 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index b4fad09..e5963b2 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.29.1' - s.dependency 'FinAppletExt' , '2.29.1' + s.dependency 'FinApplet' , '2.29.3' + s.dependency 'FinAppletExt' , '2.29.3' end