屏蔽多服务器相关逻辑

master
xiaoyu 2020-12-04 16:58:22 +08:00
parent 3f0df9df4d
commit a58322a0f3
1 changed files with 40 additions and 28 deletions

View File

@ -6,7 +6,6 @@ import android.util.Log;
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.FinAppInfo; import com.finogeeks.lib.applet.client.FinAppInfo;
import com.finogeeks.lib.applet.client.FinAppletStoreConfig;
import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.api.BaseApi;
import com.finogeeks.mop.interfaces.ICallback; import com.finogeeks.mop.interfaces.ICallback;
@ -46,9 +45,6 @@ public class AppletModule extends BaseApi {
String appId = String.valueOf(param.get("appId")); String appId = String.valueOf(param.get("appId"));
Integer sequence = (Integer) param.get("sequence"); Integer sequence = (Integer) param.get("sequence");
Map<String, String> params = (Map) param.get("params"); Map<String, String> params = (Map) param.get("params");
String apiServer = (String) param.get("apiServer");
String apiPrefix = (String) param.get("apiPrefix");
if (apiServer == null || apiServer.isEmpty() || apiPrefix == null || apiPrefix.isEmpty()) {
if (params == null) { if (params == null) {
if (sequence == null) { if (sequence == null) {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId); FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId);
@ -58,25 +54,41 @@ public class AppletModule extends BaseApi {
} else { } else {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, params); FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, params);
} }
} else { // String apiServer = (String) param.get("apiServer");
String fingerprint = (String) param.get("fingerprint"); // String apiPrefix = (String) param.get("apiPrefix");
if (fingerprint == null) { // if (apiServer == null || apiServer.isEmpty() || apiPrefix == null || apiPrefix.isEmpty()) {
fingerprint = ""; // if (params == null) {
} // if (sequence == null) {
String cryptType = (String) param.get("cryptType"); // FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId);
if (cryptType == null || cryptType.isEmpty()) { // } else {
cryptType = FinAppConfig.ENCRYPTION_TYPE_MD5; // FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, sequence, null);
} // }
FinAppletStoreConfig finAppletStoreConfig = new FinAppletStoreConfig(apiServer, apiPrefix, fingerprint, cryptType); // } else {
FinAppInfo.StartParams startParams = null; // FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, params);
if (params != null) { // }
String pageURL = params.get("path"); // } else {
String launchParams = params.get("query"); // String fingerprint = (String) param.get("fingerprint");
String scene = params.get("scene"); // if (fingerprint == null) {
startParams = new FinAppInfo.StartParams(pageURL, launchParams, scene); // fingerprint = "";
} // }
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, finAppletStoreConfig, appId, sequence, startParams); // String cryptType = (String) param.get("cryptType");
} // if (cryptType == null || cryptType.isEmpty()) {
// cryptType = FinAppConfig.ENCRYPTION_TYPE_MD5;
// }
// FinAppletStoreConfig finAppletStoreConfig = new FinAppletStoreConfig(apiServer, apiPrefix, fingerprint, cryptType);
// FinAppInfo.StartParams startParams = null;
// if (params != null) {
// String pageURL = params.get("path");
// String launchParams = params.get("query");
// String scene = params.get("scene");
// startParams = new FinAppInfo.StartParams(pageURL, launchParams, scene);
// }
// Log.d("MopPlugin", "openApplet:finAppletStoreConfig:" + finAppletStoreConfig.toString());
// Log.d("MopPlugin", "openApplet:appId:" + appId);
// Log.d("MopPlugin", "openApplet:sequence:" + sequence);
// Log.d("MopPlugin", "openApplet:startParams:" + startParams);
// FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, finAppletStoreConfig, appId, sequence, startParams);
// }
callback.onSuccess(new HashMap()); callback.onSuccess(new HashMap());
} }
} }