diff --git a/android/build.gradle b/android/build.gradle index 0d4e8fc..c6181c4 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.24.3' - implementation 'com.finogeeks.mop:plugins:2.24.3' + implementation 'com.finogeeks.lib:finapplet:2.24.7' + implementation 'com.finogeeks.mop:plugins:2.24.7' } \ No newline at end of file diff --git a/android/src/main/java/com/finogeeks/mop/api/ApisManager.java b/android/src/main/java/com/finogeeks/mop/api/ApisManager.java index c9dca8b..39bdfee 100644 --- a/android/src/main/java/com/finogeeks/mop/api/ApisManager.java +++ b/android/src/main/java/com/finogeeks/mop/api/ApisManager.java @@ -9,6 +9,7 @@ import com.finogeeks.mop.api.mop.AppletModule; import com.finogeeks.mop.api.mop.BaseModule; import com.finogeeks.mop.api.mop.ExtensionApiModule; import com.finogeeks.mop.api.mop.VersionModule; +import com.finogeeks.mop.api.mop.SmSignModule; import com.finogeeks.mop.interfaces.Event; import com.finogeeks.mop.interfaces.IApi; @@ -69,6 +70,7 @@ public class ApisManager { add(new AppletHandlerModule(activity)); add(new ExtensionApiModule(activity)); add(new VersionModule(activity)); + add(new SmSignModule(activity)); } private void add(IApi api) { diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/SmSignModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/SmSignModule.java new file mode 100644 index 0000000..2d948ae --- /dev/null +++ b/android/src/main/java/com/finogeeks/mop/api/mop/SmSignModule.java @@ -0,0 +1,34 @@ +package com.finogeeks.mop.api.mop; + +import android.content.Context; + +import com.finogeeks.finochat.sdkcore.client.FinoChatSDKCoreClient; +import com.finogeeks.lib.applet.client.FinAppClient; +import com.finogeeks.lib.applet.db.entity.FinApplet; +import com.finogeeks.mop.api.BaseApi; +import com.finogeeks.mop.interfaces.ICallback; + +import java.util.HashMap; +import java.util.Map; + +public class SmSignModule extends BaseApi { + + public SmSignModule(Context context) { + super(context); + } + + @Override + public String[] apis() { + return new String[]{"smsign"}; + } + + @Override + public void invoke(String event, Map param, ICallback callback) { + String text = (String) param.get("plainText"); + String result = FinoChatSDKCoreClient.getInstance().finoLicenseService().messageDigest(text); + Map res = new HashMap<>(); + res.put("data", result); + callback.onSuccess(res); + } + +} diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 06950b8..45782d2 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-04-13 14:41:18.519464","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-04-30 09:33:21.567900","version":"2.0.3"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 9b6cd84..75553ba 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "2.24.3" + version: "2.24.7" path: dependency: transitive description: diff --git a/ios/mop.podspec b/ios/mop.podspec index 711d709..9e12e63 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.25.0-alpha20210421v01' - s.dependency 'FinAppletExt' , '2.25.0-alpha20210421v01' + s.dependency 'FinApplet' , '2.25.0-alpha20210429v03' + s.dependency 'FinAppletExt' , '2.25.0-alpha20210429v03' end diff --git a/pubspec.yaml b/pubspec.yaml index 059695a..e57e1d4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.24.4' +version: '2.24.7' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: