From 7bce2c1ce31afc1ddb9dc50f7f098f5d8486ddab Mon Sep 17 00:00:00 2001 From: zheng Date: Wed, 11 Apr 2018 16:57:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=B8=80=E6=B3=A2assets/map?= =?UTF-8?q?=20assist/phantomjs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/van/chart/DownloadOnlineSourcesHelper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer_chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java b/designer_chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java index 394eaf543..23b4339ee 100644 --- a/designer_chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java +++ b/designer_chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java @@ -1,6 +1,7 @@ package com.fr.van.chart; import com.fr.base.FRContext; +import com.fr.chart.base.ChartConstants; import com.fr.design.RestartHelper; import com.fr.design.extra.PluginConstants; import com.fr.design.gui.ilable.UILabel; @@ -59,17 +60,17 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { private static final double PHANTOM_MB = 96.1 * 1024 * 1024; public void addPhantomSiteInfo() { - this.addSiteInfo("plugin.phantomjs", "/assist/phantomjs", PHANTOM_MB); + this.addSiteInfo("plugin.phantomjs", ChartConstants.PHANTOMJS_URL, PHANTOM_MB); } private static final double MAP_JSON_MB = 3.8 * 1024 * 1024; public void addMapJSONSiteInfo() { - this.addSiteInfo("map.json", "/assets/map", MAP_JSON_MB); + this.addSiteInfo("map.json", ChartConstants.MAP_JSON_URL, MAP_JSON_MB); } public void addSiteInfo(String siteKind, String localDir, double megaBits) { - if (new File(FRContext.getCurrentEnv().getPath() + localDir).exists()) { + if (new File(StableUtils.pathJoin(FRContext.getCurrentEnv().getPath(), localDir)).exists()) { //本地有这个资源,不下载 return; }