From e75eebb6d8fac579049f6461bea0c9e28b664698 Mon Sep 17 00:00:00 2001 From: cenxiaozhong Date: Tue, 17 May 2022 16:30:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 2 +- .../mop/api/mop/AppletManageModule.java | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 76b7c0b..5edfc73 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.36.5' + implementation 'com.finogeeks.lib:finapplet:2.36.5-fix202220517v01' implementation 'com.finogeeks.mop:plugins:2.36.5' } \ No newline at end of file diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java index 1903dce..7ead497 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java @@ -12,6 +12,7 @@ import com.finogeeks.lib.applet.anim.SlideFromTopToBottomAnim; import com.finogeeks.lib.applet.client.FinAppClient; import com.finogeeks.lib.applet.db.entity.FinApplet; import com.finogeeks.lib.applet.interfaces.FinCallback; +import com.finogeeks.lib.applet.rest.model.WechatLoginInfo; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; import com.google.gson.Gson; @@ -31,7 +32,7 @@ public class AppletManageModule extends BaseApi { @Override public String[] apis() { return new String[]{"currentApplet", "closeAllApplets", "clearApplets", "removeUsedApplet", "closeApplet", - "setActivityTransitionAnim", "sendCustomEvent", "callJS","finishRunningApplet"}; + "setActivityTransitionAnim", "sendCustomEvent", "callJS", "finishRunningApplet"}; } @Override @@ -48,6 +49,19 @@ public class AppletManageModule extends BaseApi { res.put("description", applet.getDescription()); res.put("version", applet.getVersion()); res.put("thumbnail", applet.getThumbnail()); + Map wechatLoginInfo = new HashMap<>(3); +// wechatLoginInfo.put("wechatOriginId", "1"); +// wechatLoginInfo.put("profileUrl", "2"); +// wechatLoginInfo.put("phoneUrl", "3"); + WechatLoginInfo wechatLogin = applet.getWechatLoginInfo(); + if (wechatLogin != null) { + wechatLoginInfo.put("wechatOriginId", wechatLogin.getWechatOriginId()); + wechatLoginInfo.put("profileUrl", wechatLogin.getProfileUrl()); + wechatLoginInfo.put("phoneUrl", wechatLogin.getPhoneUrl()); + res.put("wechatLoginInfo",wechatLoginInfo); + }else{ + res.put("wechatLoginInfo", null); + } callback.onSuccess(res); } else { callback.onSuccess(null); @@ -58,7 +72,7 @@ public class AppletManageModule extends BaseApi { } else if (event.equals("closeAllApplets")) { FinAppClient.INSTANCE.getAppletApiManager().closeApplets(); callback.onSuccess(null); - }else if(event.equals("finishRunningApplet")){ + } else if (event.equals("finishRunningApplet")) { if (param.containsKey("appId") && param.get("appId") instanceof String) { String appId = (String) param.get("appId"); FinAppClient.INSTANCE.getAppletApiManager().finishRunningApplet(appId);