From 78b07437b6ea45ca543de71b657dc1f111cd8378 Mon Sep 17 00:00:00 2001 From: developer Date: Mon, 16 Aug 2021 17:54:51 +0800 Subject: [PATCH 01/16] release: version:2.33.3 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 98675fa..62aa5d0 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.33.7' - s.dependency 'FinAppletExt' , '2.33.7' + s.dependency 'FinApplet' , '2.33.3' + s.dependency 'FinAppletExt' , '2.33.3' end From 215991eab0d6f64fcf731498e52bda70079f6367 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 19 Aug 2021 14:31:54 +0800 Subject: [PATCH 02/16] 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 bb6af65..14c0d09 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.33.3' + implementation 'com.finogeeks.lib:finapplet:2.34.0-alpha20210819v01' implementation 'com.finogeeks.mop:plugins:2.33.3' } \ No newline at end of file From 28a088c33ffe704cfa721763816ee8085b0ed4d2 Mon Sep 17 00:00:00 2001 From: zhongweiguang Date: Fri, 20 Aug 2021 15:53:39 +0800 Subject: [PATCH 03/16] =?UTF-8?q?android:=20ExtensionApiModule=E6=94=AF?= =?UTF-8?q?=E6=8C=81callback=20fail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mop/api/mop/ExtensionApiModule.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java index 70269da..b6cc51f 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java @@ -6,6 +6,7 @@ import android.os.Looper; import android.util.Log; import com.finogeeks.lib.applet.client.FinAppClient; +import com.finogeeks.lib.applet.client.FinAppTrace; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; import com.finogeeks.mop.service.MopPluginService; @@ -22,6 +23,8 @@ import io.flutter.plugin.common.MethodChannel; public class ExtensionApiModule extends BaseApi { + private static final String TAG = "ExtensionApiModule"; + private Handler handler = new Handler(Looper.getMainLooper()); public ExtensionApiModule(Context context) { @@ -52,18 +55,33 @@ public class ExtensionApiModule extends BaseApi { @Override public void success(Object result) { String json = GsonUtil.gson.toJson(result); + FinAppTrace.d(ExtensionApiModule.TAG, "channel invokeMethod:" + name + + " success, result=" + result + ", json=" + json); JSONObject ret = null; - if (json != null && !json.equals("null")) + if (json != null && !json.equals("null")) { try { ret = new JSONObject(json); + if (ret.has("errMsg")) { + String errMsg = ret.getString("errMsg"); + if (errMsg.startsWith(name + ":fail")) { + iCallback.onFail(ret); + return; + } + } } catch (JSONException e) { e.printStackTrace(); } + } + iCallback.onSuccess(ret); } @Override public void error(String errorCode, String errorMessage, Object errorDetails) { + FinAppTrace.e(ExtensionApiModule.TAG, "channel invokeMethod:" + name + + " error, errorCode=" + errorCode + + ", errorMessage=" + errorMessage + + ", errorDetails=" + errorDetails); iCallback.onFail(); } From d9445020f618876907215d9535a193ad7e0c23f7 Mon Sep 17 00:00:00 2001 From: jizelin Date: Fri, 20 Aug 2021 16:39:39 +0800 Subject: [PATCH 04/16] =?UTF-8?q?feat=EF=BC=9Aios=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89api=E5=9B=9E=E8=B0=83=E6=97=B6=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=E9=94=99=E8=AF=AF=E6=83=85=E5=86=B5=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 2 +- ios/Classes/Api/MOP_registerExtensionApi.m | 8 ++++---- ios/mop.podspec | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 46de6ce..82c7661 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-08-13 09:53:09.007824","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/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-08-19 15:38:17.756101","version":"2.2.2"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 75c4c64..83d3ca0 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "2.33.5" + version: "2.33.3" path: dependency: transitive description: diff --git a/ios/Classes/Api/MOP_registerExtensionApi.m b/ios/Classes/Api/MOP_registerExtensionApi.m index f4fd119..d86d4d4 100644 --- a/ios/Classes/Api/MOP_registerExtensionApi.m +++ b/ios/Classes/Api/MOP_registerExtensionApi.m @@ -22,12 +22,12 @@ NSString* api = [@"extensionApi:" stringByAppendingString:self.name]; [channel invokeMethod:api arguments:param result:^(id _Nullable result) { NSLog(@"extensionApi reslut:%@",result); - if([result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented) - { + BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented; + BOOL hasError = [[result allKeys] containsObject:@"errMsg"]; + if (isFlutterError || hasError) { NSLog(@"extensionApi reslut:fail"); callback(FATExtensionCodeFailure,nil); - }else - { + } else { NSLog(@"extensionApi callback:%@",result); callback(FATExtensionCodeSuccess,result); } diff --git a/ios/mop.podspec b/ios/mop.podspec index 62aa5d0..d81b250 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.33.3' - s.dependency 'FinAppletExt' , '2.33.3' + s.dependency 'FinApplet' , '2.34.0-alpha20210819v02' + s.dependency 'FinAppletExt' , '2.34.0-alpha20210819v02' end From d84646a42fcd5dc3f285a7de3570e52eea77f386 Mon Sep 17 00:00:00 2001 From: jizelin Date: Fri, 20 Aug 2021 17:01:15 +0800 Subject: [PATCH 05/16] =?UTF-8?q?feat=EF=BC=9A=E8=87=AA=E5=AE=9A=E4=B9=89a?= =?UTF-8?q?pi=E4=BF=AE=E6=94=B9=E5=9B=9E=E8=B0=83=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E4=B8=8E=E5=AE=89=E5=8D=93=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_registerExtensionApi.m | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/ios/Classes/Api/MOP_registerExtensionApi.m b/ios/Classes/Api/MOP_registerExtensionApi.m index d86d4d4..c1dedaf 100644 --- a/ios/Classes/Api/MOP_registerExtensionApi.m +++ b/ios/Classes/Api/MOP_registerExtensionApi.m @@ -22,15 +22,28 @@ NSString* api = [@"extensionApi:" stringByAppendingString:self.name]; [channel invokeMethod:api arguments:param result:^(id _Nullable result) { NSLog(@"extensionApi reslut:%@",result); + // 先判断是否flutter发生错误 BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented; - BOOL hasError = [[result allKeys] containsObject:@"errMsg"]; - if (isFlutterError || hasError) { + if (isFlutterError) { NSLog(@"extensionApi reslut:fail"); callback(FATExtensionCodeFailure,nil); - } else { - NSLog(@"extensionApi callback:%@",result); - callback(FATExtensionCodeSuccess,result); + return; } + // 再判断回调是否为失败 + BOOL hasError = [[result allKeys] containsObject:@"errMsg"]; + if (hasError) { + NSString *errMsg = result[@"errMsg"]; + NSString *errPrefix = [NSString stringWithFormat:@"%@:fail", self.name]; + BOOL isFail = [errMsg hasPrefix:errPrefix]; + if (isFail) { + NSLog(@"extensionApi reslut:fail"); + callback(FATExtensionCodeFailure,nil); + return; + } + } + // 其他的按成功处理 + NSLog(@"extensionApi callback:%@",result); + callback(FATExtensionCodeSuccess,result); }]; }]; success(@{}); From 13da682e3e9bd474d06b5c696f51cd6efc4ab498 Mon Sep 17 00:00:00 2001 From: jenkins Date: Wed, 25 Aug 2021 09:38:08 +0800 Subject: [PATCH 06/16] 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 14c0d09..3622782 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.0-alpha20210819v01' - implementation 'com.finogeeks.mop:plugins:2.33.3' + implementation 'com.finogeeks.lib:finapplet:2.33.5' + implementation 'com.finogeeks.mop:plugins:2.33.5' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 5356e25..347f6d6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.33.3' +version: '2.33.5' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 0d3f9594751eaab44b750f871c8e3c056296636f Mon Sep 17 00:00:00 2001 From: developer Date: Wed, 25 Aug 2021 09:39:21 +0800 Subject: [PATCH 07/16] release: version:2.33.5 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index d81b250..4fd5f47 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.0-alpha20210819v02' - s.dependency 'FinAppletExt' , '2.34.0-alpha20210819v02' + s.dependency 'FinApplet' , '2.33.5' + s.dependency 'FinAppletExt' , '2.33.5' end From 7314fad151477756aca64ac6b954379b5cff9dc4 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 25 Aug 2021 22:03:04 +0800 Subject: [PATCH 08/16] Add bindAppletWithMainProcess config --- .../src/main/java/com/finogeeks/mop/api/mop/BaseModule.java | 3 +++ lib/mop.dart | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java index 575de50..f892b22 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java @@ -71,6 +71,8 @@ public class BaseModule extends BaseApi { if (encryptServerData == null) encryptServerData = false; Boolean debug = (Boolean) param.get("debug"); if (debug == null) debug = false; + Boolean bindAppletWithMainProcess = (Boolean) param.get("bindAppletWithMainProcess"); + if (bindAppletWithMainProcess == null) bindAppletWithMainProcess = false; FinAppConfig config = new FinAppConfig.Builder() .setSdkKey(appkey) @@ -82,6 +84,7 @@ public class BaseModule extends BaseApi { .setUserId(userId) .setDebugMode(debug) .setDisableRequestPermissions(disablePermission) + .setBindAppletWithMainProcess(bindAppletWithMainProcess) .build(); final Application application = MopPluginService.getInstance().getActivity().getApplication(); diff --git a/lib/mop.dart b/lib/mop.dart index 7590e2d..e422084 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -76,7 +76,8 @@ class Mop { bool disablePermission, String userId, bool encryptServerData = false, - bool debug = false}) async { + bool debug = false, + bool bindAppletWithMainProcess = false}) async { final Map ret = await _channel.invokeMethod('initialize', { 'appkey': appkey, 'secret': secret, @@ -86,7 +87,8 @@ class Mop { 'disablePermission': disablePermission, 'userId': userId, "encryptServerData": encryptServerData, - "debug": debug + "debug": debug, + "bindAppletWithMainProcess": bindAppletWithMainProcess }); return ret; } From 2ad702368b2cc41d549408c8443c74813dd2357a Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 27 Aug 2021 14:18:57 +0800 Subject: [PATCH 09/16] 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 3622782..5db7a7e 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.33.5' - implementation 'com.finogeeks.mop:plugins:2.33.5' + implementation 'com.finogeeks.lib:finapplet:2.33.7' + implementation 'com.finogeeks.mop:plugins:2.33.7' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 347f6d6..3bace6f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.33.5' +version: '2.33.7' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From a3f3d30c79ca5a452d28171a590050f0294db147 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 27 Aug 2021 14:20:12 +0800 Subject: [PATCH 10/16] release: version:2.33.7 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 4fd5f47..98675fa 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.33.5' - s.dependency 'FinAppletExt' , '2.33.5' + s.dependency 'FinApplet' , '2.33.7' + s.dependency 'FinAppletExt' , '2.33.7' end From b8885aa1aa3ed0686cba0dfa2311690f5dbd5c40 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Fri, 27 Aug 2021 15:20:06 +0800 Subject: [PATCH 11/16] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 5db7a7e..c58abb6 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.33.7' + implementation 'com.finogeeks.lib:finapplet:2.34.0-alpha20210827v02' implementation 'com.finogeeks.mop:plugins:2.33.7' } \ No newline at end of file From 4fb9f1b075f04de2a513e49db1702fe7c693874b Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 27 Aug 2021 19:28:24 +0800 Subject: [PATCH 12/16] 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 c58abb6..6f91ef7 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.0-alpha20210827v02' - implementation 'com.finogeeks.mop:plugins:2.33.7' + implementation 'com.finogeeks.lib:finapplet:2.33.9' + implementation 'com.finogeeks.mop:plugins:2.33.9' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 3bace6f..145bbb4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.33.7' +version: '2.33.9' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From f1132348f94fdde950936588e890eab9855410c0 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 27 Aug 2021 19:29:46 +0800 Subject: [PATCH 13/16] release: version:2.33.9 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 98675fa..baf7ce4 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.33.7' - s.dependency 'FinAppletExt' , '2.33.7' + s.dependency 'FinApplet' , '2.33.9' + s.dependency 'FinAppletExt' , '2.33.9' end From 1d1d2e86556e4766e037076e95d9944656e7e1b6 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Fri, 27 Aug 2021 23:05:59 +0800 Subject: [PATCH 14/16] upgrade --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 6f91ef7..c6e15ac 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.33.9' - implementation 'com.finogeeks.mop:plugins:2.33.9' + implementation 'com.finogeeks.lib:finapplet:2.34.0-alpha20210827v04' + implementation 'com.finogeeks.mop:plugins:2.33.7' } \ No newline at end of file From f50eb2b6decfeb88e20713e423f1e46cb71ae828 Mon Sep 17 00:00:00 2001 From: jenkins Date: Sat, 28 Aug 2021 16:19:00 +0800 Subject: [PATCH 15/16] 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 c6e15ac..40836c8 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.0-alpha20210827v04' - implementation 'com.finogeeks.mop:plugins:2.33.7' + implementation 'com.finogeeks.lib:finapplet:2.33.11' + implementation 'com.finogeeks.mop:plugins:2.33.11' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 145bbb4..be08e09 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.33.9' +version: '2.33.11' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 60e1d0c9d8f5991861deaea1d841bb0ec4b826c2 Mon Sep 17 00:00:00 2001 From: developer Date: Sat, 28 Aug 2021 16:20:21 +0800 Subject: [PATCH 16/16] release: version:2.33.11 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index baf7ce4..abaf082 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.33.9' - s.dependency 'FinAppletExt' , '2.33.9' + s.dependency 'FinApplet' , '2.33.11' + s.dependency 'FinAppletExt' , '2.33.11' end