fix conflict
commit
774ee82080
|
@ -91,6 +91,6 @@ kapt {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'com.finogeeks.lib:finapplet:2.24.3'
|
implementation 'com.finogeeks.lib:finapplet:2.24.7'
|
||||||
implementation 'com.finogeeks.mop:plugins:2.24.3'
|
implementation 'com.finogeeks.mop:plugins:2.24.7'
|
||||||
}
|
}
|
|
@ -9,6 +9,7 @@ import com.finogeeks.mop.api.mop.AppletModule;
|
||||||
import com.finogeeks.mop.api.mop.BaseModule;
|
import com.finogeeks.mop.api.mop.BaseModule;
|
||||||
import com.finogeeks.mop.api.mop.ExtensionApiModule;
|
import com.finogeeks.mop.api.mop.ExtensionApiModule;
|
||||||
import com.finogeeks.mop.api.mop.VersionModule;
|
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.Event;
|
||||||
import com.finogeeks.mop.interfaces.IApi;
|
import com.finogeeks.mop.interfaces.IApi;
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ public class ApisManager {
|
||||||
add(new AppletHandlerModule(activity));
|
add(new AppletHandlerModule(activity));
|
||||||
add(new ExtensionApiModule(activity));
|
add(new ExtensionApiModule(activity));
|
||||||
add(new VersionModule(activity));
|
add(new VersionModule(activity));
|
||||||
|
add(new SmSignModule(activity));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void add(IApi api) {
|
private void add(IApi api) {
|
||||||
|
|
|
@ -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<String, Object> res = new HashMap<>();
|
||||||
|
res.put("data", result);
|
||||||
|
callback.onSuccess(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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"}
|
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-04-22 10:00:57.239343","version":"2.1.0-13.0.pre.340"}
|
|
@ -87,7 +87,7 @@ packages:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.24.3"
|
version: "2.24.4"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -106,7 +106,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// MOP_smsign.h
|
||||||
|
// mop
|
||||||
|
//
|
||||||
|
// Created by beetle_92 on 2021/4/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "MOPBaseApi.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface MOP_smsign : MOPBaseApi
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *plainText;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,21 @@
|
||||||
|
//
|
||||||
|
// MOP_smsign.m
|
||||||
|
// mop
|
||||||
|
//
|
||||||
|
// Created by beetle_92 on 2021/4/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MOP_smsign.h"
|
||||||
|
#import <FinApplet/FinApplet.h>
|
||||||
|
|
||||||
|
@implementation MOP_smsign
|
||||||
|
|
||||||
|
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel
|
||||||
|
{
|
||||||
|
NSLog(@"smsign");
|
||||||
|
NSString *signature = [[FATClient sharedClient] getSM3String:self.plainText];
|
||||||
|
NSLog(@"signature = %@", signature);
|
||||||
|
success(@{@"data": signature});
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
|
||||||
s.dependency 'Flutter'
|
s.dependency 'Flutter'
|
||||||
s.ios.deployment_target = '9.0'
|
s.ios.deployment_target = '9.0'
|
||||||
|
|
||||||
s.dependency 'FinApplet' , '2.24.3'
|
s.dependency 'FinApplet' , '2.25.0-alpha20210429v03'
|
||||||
s.dependency 'FinAppletExt' , '2.24.3'
|
s.dependency 'FinAppletExt' , '2.25.0-alpha20210429v03'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -195,4 +195,13 @@ class Mop {
|
||||||
_extensionApis[name] = handler;
|
_extensionApis[name] = handler;
|
||||||
_channel.invokeMethod("registerExtensionApi", {"name": name});
|
_channel.invokeMethod("registerExtensionApi", {"name": name});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 获取国密加密
|
||||||
|
Future<String> getSMSign(String plainText) async {
|
||||||
|
var result =
|
||||||
|
await _channel.invokeMapMethod("smsign", {'plainText': plainText});
|
||||||
|
var data = result['data']['data'];
|
||||||
|
print(data);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: mop
|
name: mop
|
||||||
description: A Finogeeks MiniProgram Flutter SDK.
|
description: A Finogeeks MiniProgram Flutter SDK.
|
||||||
version: '2.24.4'
|
version: '2.24.7'
|
||||||
homepage: https://github.com/finogeeks/mop-flutter-sdk
|
homepage: https://github.com/finogeeks/mop-flutter-sdk
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in New Issue