增加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");
}
Boolean needEncrypt = (Boolean) param.get("needEncrypt");
if (needEncrypt == null) needEncrypt = false;
Boolean encryptServerData = (Boolean) param.get("encryptServerData");
if (encryptServerData == null) encryptServerData = false;
Boolean debug = (Boolean) param.get("debug");
if (debug == null) debug = false;
@ -78,6 +78,7 @@ public class BaseModule extends BaseApi {
.setApiUrl(apiServer)
.setApiPrefix(apiPrefix)
.setEncryptionType(cryptType)
.setEncryptServerData(encryptServerData)
.setUserId(userId)
.setDebugMode(debug)
.setDisableRequestPermissions(disablePermission)

View File

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