From 1c33bfe011c4044a6f060bf76300f592b9a6a86a Mon Sep 17 00:00:00 2001 From: vito Date: Wed, 1 Nov 2017 14:43:24 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-5143=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=89=8B=E6=9C=BA=E9=82=AE=E7=AE=B1=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginWebBridge.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/designer_base/src/com/fr/design/extra/PluginWebBridge.java b/designer_base/src/com/fr/design/extra/PluginWebBridge.java index 14b70aa87e..438deb9145 100644 --- a/designer_base/src/com/fr/design/extra/PluginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/PluginWebBridge.java @@ -5,6 +5,7 @@ import com.fr.base.FRContext; import com.fr.design.RestartHelper; import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.dialog.UIDialog; +import com.fr.design.extra.exe.PluginLoginExecutor; import com.fr.design.extra.exe.callback.JSCallback; import com.fr.design.gui.ilable.UILabel; import com.fr.general.FRLogger; @@ -17,6 +18,7 @@ import com.fr.plugin.context.PluginMarker; import com.fr.plugin.manage.PluginManager; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; +import javafx.concurrent.Task; import javafx.scene.web.WebEngine; import javafx.stage.FileChooser; import javafx.stage.Stage; @@ -491,6 +493,18 @@ public class PluginWebBridge { this.uiLabel = uiLabel; } + /** + * 设计器端的用户登录 + * + * @param username 用户名 + * @param password 密码 + * @return 登录信息标志 + */ + public void defaultLogin(String username, String password, final JSObject callback) { + Task task = new PluginTask<>(webEngine, callback, new PluginLoginExecutor(username, password)); + new Thread(task).start(); + } + /** * 弹出QQ授权页面 */