From 9bfdb0e7a8aa0d41e3e440a1ce87dc6176047727 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Mon, 9 Aug 2021 16:28:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0encryptServerData=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/finogeeks/mop/api/mop/BaseModule.java | 5 +++-- lib/mop.dart | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java index dd4ba73..575de50 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java @@ -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) diff --git a/lib/mop.dart b/lib/mop.dart index 39d9fa6..7590e2d 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -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;