From 36adc640e62791b3c27f731ca623d81359eaaeae Mon Sep 17 00:00:00 2001 From: developer Date: Wed, 9 Jun 2021 22:28:41 +0800 Subject: [PATCH 1/7] release: version:2.29.3 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index cb91bd7..7273ec1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.29.1' +version: '2.29.3' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From f5a751cae079f521a44f485237a863fc583f5c22 Mon Sep 17 00:00:00 2001 From: developer Date: Tue, 15 Jun 2021 23:49:52 +0800 Subject: [PATCH 2/7] 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 cdca7e797d28c1516cbe4a29e2e059181ff090cd Mon Sep 17 00:00:00 2001 From: jizelin Date: Fri, 11 Jun 2021 18:57:54 +0800 Subject: [PATCH 3/7] =?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 21a70adcfa929a0bd8e01ec3f7fa49cdbdfc99d0 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 15 Jun 2021 20:12:27 +0800 Subject: [PATCH 4/7] =?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 0c05c043ea85346a6aa6448d74cf4a3bcda4155b Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 15 Jun 2021 23:50:26 +0800 Subject: [PATCH 5/7] 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 b0fe2cf742e63b386ca1c1aabfdfcb34f5cd6c6a Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 18 Jun 2021 16:44:58 +0800 Subject: [PATCH 6/7] 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 a09c2bccd742703da912c7e49b3dfeea81f51cc8 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 18 Jun 2021 23:00:22 +0800 Subject: [PATCH 7/7] 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