增加needEncrypt参数
parent
7a065cbdde
commit
e9dd1a5c93
|
@ -91,6 +91,6 @@ kapt {
|
|||
}
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.finogeeks.lib:finapplet:2.32.1'
|
||||
implementation 'com.finogeeks.lib:finapplet:2.33.0-alpha20210719v02'
|
||||
implementation 'com.finogeeks.mop:plugins:2.32.1'
|
||||
}
|
|
@ -6,11 +6,14 @@ import android.content.Context;
|
|||
import com.finogeeks.lib.applet.BuildConfig;
|
||||
import com.finogeeks.lib.applet.client.FinAppClient;
|
||||
import com.finogeeks.lib.applet.client.FinAppConfig;
|
||||
import com.finogeeks.lib.applet.client.FinStoreConfig;
|
||||
import com.finogeeks.lib.applet.interfaces.FinCallback;
|
||||
import com.finogeeks.mop.api.BaseApi;
|
||||
import com.finogeeks.mop.interfaces.ICallback;
|
||||
import com.finogeeks.mop.service.MopPluginService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class BaseModule extends BaseApi {
|
||||
|
@ -63,14 +66,21 @@ public class BaseModule extends BaseApi {
|
|||
if (param.get("userId") != null) {
|
||||
userId = (String) param.get("userId");
|
||||
}
|
||||
|
||||
Boolean needEncrypt = (Boolean) param.get("needEncrypt");
|
||||
if (needEncrypt == null) needEncrypt = false;
|
||||
Boolean debug = (Boolean) param.get("debug");
|
||||
if (debug == null) debug = false;
|
||||
|
||||
FinAppConfig config = new FinAppConfig.Builder()
|
||||
.setSdkKey(appkey)
|
||||
.setSdkSecret(secret)
|
||||
.setApiUrl(apiServer)
|
||||
.setApiPrefix(apiPrefix)
|
||||
.setEncryptionType(cryptType)
|
||||
.setNeedEncrypt(needEncrypt)
|
||||
.setUserId(userId)
|
||||
.setDebugMode(BuildConfig.DEBUG)
|
||||
.setDebugMode(debug)
|
||||
.setDisableRequestPermissions(disablePermission)
|
||||
.build();
|
||||
|
||||
|
|
|
@ -74,7 +74,9 @@ class Mop {
|
|||
String apiPrefix,
|
||||
String cryptType,
|
||||
bool disablePermission,
|
||||
String userId}) async {
|
||||
String userId,
|
||||
bool needEncrypt = false,
|
||||
bool debug = false}) async {
|
||||
final Map ret = await _channel.invokeMethod('initialize', {
|
||||
'appkey': appkey,
|
||||
'secret': secret,
|
||||
|
@ -82,7 +84,9 @@ class Mop {
|
|||
'apiPrefix': apiPrefix,
|
||||
'cryptType': cryptType,
|
||||
'disablePermission': disablePermission,
|
||||
'userId': userId
|
||||
'userId': userId,
|
||||
"needEncrypt": needEncrypt,
|
||||
"debug": debug
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue