增加encryptServerData参数

master
kangxuyao 2021-08-09 16:28:47 +08:00
parent 12260111ac
commit 9bfdb0e7a8
2 changed files with 5 additions and 4 deletions

View File

@ -67,8 +67,8 @@ public class BaseModule extends BaseApi {
userId = (String) param.get("userId"); userId = (String) param.get("userId");
} }
Boolean needEncrypt = (Boolean) param.get("needEncrypt"); Boolean encryptServerData = (Boolean) param.get("encryptServerData");
if (needEncrypt == null) needEncrypt = false; if (encryptServerData == null) encryptServerData = false;
Boolean debug = (Boolean) param.get("debug"); Boolean debug = (Boolean) param.get("debug");
if (debug == null) debug = false; if (debug == null) debug = false;
@ -78,6 +78,7 @@ public class BaseModule extends BaseApi {
.setApiUrl(apiServer) .setApiUrl(apiServer)
.setApiPrefix(apiPrefix) .setApiPrefix(apiPrefix)
.setEncryptionType(cryptType) .setEncryptionType(cryptType)
.setEncryptServerData(encryptServerData)
.setUserId(userId) .setUserId(userId)
.setDebugMode(debug) .setDebugMode(debug)
.setDisableRequestPermissions(disablePermission) .setDisableRequestPermissions(disablePermission)

View File

@ -75,7 +75,7 @@ class Mop {
String cryptType, String cryptType,
bool disablePermission, bool disablePermission,
String userId, String userId,
bool needEncrypt = false, bool encryptServerData = false,
bool debug = false}) async { bool debug = false}) async {
final Map ret = await _channel.invokeMethod('initialize', { final Map ret = await _channel.invokeMethod('initialize', {
'appkey': appkey, 'appkey': appkey,
@ -85,7 +85,7 @@ class Mop {
'cryptType': cryptType, 'cryptType': cryptType,
'disablePermission': disablePermission, 'disablePermission': disablePermission,
'userId': userId, 'userId': userId,
"needEncrypt": needEncrypt, "encryptServerData": encryptServerData,
"debug": debug "debug": debug
}); });
return ret; return ret;