From a01d78599f7744f4c801de968566bd73f57cb9a4 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 15 Feb 2022 15:41:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-66465=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E9=A3=8E=E6=A0=BC=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=95=86=E5=9F=8E=EF=BC=8C=E6=A6=82?= =?UTF-8?q?=E7=8E=87=E6=89=93=E5=BC=80=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 调试模式下禁止HTTPS证书验证,使得商城测试服务器 可以正常访问 【改动思路】 同上 --- .../fr/design/ui/compatible/NewModernUIPane.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index d755d4e05f..0b56fc0ad6 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -17,8 +17,11 @@ import com.teamdev.jxbrowser.engine.EngineOptions; import com.teamdev.jxbrowser.engine.RenderingMode; import com.teamdev.jxbrowser.event.Observer; import com.teamdev.jxbrowser.js.JsObject; +import com.teamdev.jxbrowser.net.Network; import com.teamdev.jxbrowser.net.Scheme; +import com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback; import com.teamdev.jxbrowser.view.swing.BrowserView; +import org.jetbrains.annotations.Nullable; import java.awt.BorderLayout; @@ -108,6 +111,17 @@ public class NewModernUIPane extends ModernUIPane { } Engine engine = Engine.newInstance(builder.build()); + if (DesignerEnvManager.getEnvManager().isOpenDebug()) { + // 调试模式下,禁止HTTPS证书验证,使得可以正常访问商城测试服务器等 + Network network = engine.network(); + network.set(VerifyCertificateCallback.class, new VerifyCertificateCallback() { + @Nullable + @Override + public Response on(Params params) { + return VerifyCertificateCallback.Response.valid(); + } + }); + } browser = engine.newBrowser(); // 初始化的时候,就把命名空间对象初始化好,确保window.a.b.c("a.b.c"为命名空间)对象都是初始化过的 From 50754f75d2611da9e5265d3eaa819b3b073083ae Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 15 Feb 2022 17:08:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-66807=20Mini=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E5=90=AF=E5=8A=A8=E6=9D=A5=E6=BA=90=E5=9F=8B?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 区分不同的启动来源,便于埋点分析 【改动思路】 同上 --- .../design/mainframe/share/ui/online/OnlineWidgetTabPane.java | 2 +- .../share/ui/online/mini/MiniComponentShopDialog.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java index 1ab2cec121..cfa5d799f1 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java @@ -104,7 +104,7 @@ public class OnlineWidgetTabPane extends JPanel { @Override public void actionPerformed(ActionEvent e) { if (OnlineShopUtils.testConnection() && ComponentShareUtil.isShowMiniShopWindow()) { - MiniComponentShopDialog.getInstance().show(); + MiniComponentShopDialog.getInstance().showFromOnlineRepoPane(); FormWidgetDetailPane.getInstance().switch2Local(); FormWidgetDetailPane.getInstance().enterWidgetLib(); } else { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java index 81bc642b47..817adfa347 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java @@ -110,6 +110,10 @@ public class MiniComponentShopDialog { frame.setVisible(true); } + public void showFromOnlineRepoPane() { + show(); + } + public Container getContentPane() { if (frame != null) { return frame.getContentPane();