【update】 还原修改
parent
41e83dd22d
commit
b0672a0fbe
|
@ -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.30.0-alpha20210618v06'
|
s.dependency 'FinApplet' , '2.30.0-alpha20210619v02'
|
||||||
s.dependency 'FinAppletExt' , '2.30.0-alpha20210618v06'
|
s.dependency 'FinAppletExt' , '2.30.0-alpha20210619v02'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
19
lib/mop.dart
19
lib/mop.dart
|
@ -9,19 +9,6 @@ typedef MopEventErrorCallback = void Function(dynamic event);
|
||||||
|
|
||||||
typedef ExtensionApiHandler = Future Function(dynamic params);
|
typedef ExtensionApiHandler = Future Function(dynamic params);
|
||||||
|
|
||||||
class ServerConfig {
|
|
||||||
String appkey;
|
|
||||||
String secret;
|
|
||||||
String apiServer;
|
|
||||||
String apiPrefix;
|
|
||||||
String cryptType;
|
|
||||||
|
|
||||||
ServerConfig(this.appkey, this.secret, this.apiServer, this.apiPrefix, this.cryptType);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() =>
|
|
||||||
{'appkey': appkey, 'secret': secret, 'apiServer': apiServer, 'apiPrefix': apiPrefix, 'cryptType':cryptType};
|
|
||||||
}
|
|
||||||
|
|
||||||
class Mop {
|
class Mop {
|
||||||
static final Mop _instance = new Mop._internal();
|
static final Mop _instance = new Mop._internal();
|
||||||
MethodChannel _channel;
|
MethodChannel _channel;
|
||||||
|
@ -87,8 +74,7 @@ class Mop {
|
||||||
String apiPrefix,
|
String apiPrefix,
|
||||||
String cryptType,
|
String cryptType,
|
||||||
bool disablePermission,
|
bool disablePermission,
|
||||||
String userId,
|
String userId}) async {
|
||||||
List<ServerConfig> serverConfigs}) async {
|
|
||||||
final Map ret = await _channel.invokeMethod('initialize', {
|
final Map ret = await _channel.invokeMethod('initialize', {
|
||||||
'appkey': appkey,
|
'appkey': appkey,
|
||||||
'secret': secret,
|
'secret': secret,
|
||||||
|
@ -96,8 +82,7 @@ class Mop {
|
||||||
'apiPrefix': apiPrefix,
|
'apiPrefix': apiPrefix,
|
||||||
'cryptType': cryptType,
|
'cryptType': cryptType,
|
||||||
'disablePermission': disablePermission,
|
'disablePermission': disablePermission,
|
||||||
'userId': userId,
|
'userId': userId
|
||||||
'serverConfigs',serverConfigs.map((e) => e.toJson())
|
|
||||||
});
|
});
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue