Revert "增加needEncrypt参数"

This reverts commit e9dd1a5c
master
kangxuyao 2021-07-19 14:46:36 +08:00
parent e9dd1a5c93
commit 3874690bbb
3 changed files with 4 additions and 18 deletions

View File

@ -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.33.0-alpha20210719v02' implementation 'com.finogeeks.lib:finapplet:2.32.1'
implementation 'com.finogeeks.mop:plugins:2.32.1' implementation 'com.finogeeks.mop:plugins:2.32.1'
} }

View File

@ -6,14 +6,11 @@ import android.content.Context;
import com.finogeeks.lib.applet.BuildConfig; import com.finogeeks.lib.applet.BuildConfig;
import com.finogeeks.lib.applet.client.FinAppClient; import com.finogeeks.lib.applet.client.FinAppClient;
import com.finogeeks.lib.applet.client.FinAppConfig; import com.finogeeks.lib.applet.client.FinAppConfig;
import com.finogeeks.lib.applet.client.FinStoreConfig;
import com.finogeeks.lib.applet.interfaces.FinCallback; import com.finogeeks.lib.applet.interfaces.FinCallback;
import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.api.BaseApi;
import com.finogeeks.mop.interfaces.ICallback; import com.finogeeks.mop.interfaces.ICallback;
import com.finogeeks.mop.service.MopPluginService; import com.finogeeks.mop.service.MopPluginService;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
public class BaseModule extends BaseApi { public class BaseModule extends BaseApi {
@ -66,21 +63,14 @@ public class BaseModule extends BaseApi {
if (param.get("userId") != null) { if (param.get("userId") != null) {
userId = (String) param.get("userId"); 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() FinAppConfig config = new FinAppConfig.Builder()
.setSdkKey(appkey) .setSdkKey(appkey)
.setSdkSecret(secret) .setSdkSecret(secret)
.setApiUrl(apiServer) .setApiUrl(apiServer)
.setApiPrefix(apiPrefix) .setApiPrefix(apiPrefix)
.setEncryptionType(cryptType) .setEncryptionType(cryptType)
.setNeedEncrypt(needEncrypt)
.setUserId(userId) .setUserId(userId)
.setDebugMode(debug) .setDebugMode(BuildConfig.DEBUG)
.setDisableRequestPermissions(disablePermission) .setDisableRequestPermissions(disablePermission)
.build(); .build();

View File

@ -74,9 +74,7 @@ class Mop {
String apiPrefix, String apiPrefix,
String cryptType, String cryptType,
bool disablePermission, bool disablePermission,
String userId, String userId}) async {
bool needEncrypt = false,
bool debug = false}) async {
final Map ret = await _channel.invokeMethod('initialize', { final Map ret = await _channel.invokeMethod('initialize', {
'appkey': appkey, 'appkey': appkey,
'secret': secret, 'secret': secret,
@ -84,9 +82,7 @@ class Mop {
'apiPrefix': apiPrefix, 'apiPrefix': apiPrefix,
'cryptType': cryptType, 'cryptType': cryptType,
'disablePermission': disablePermission, 'disablePermission': disablePermission,
'userId': userId, 'userId': userId
"needEncrypt": needEncrypt,
"debug": debug
}); });
return ret; return ret;
} }