Browse Source

Merge pull request #111 in BA/design from ~VITO/design:master to master

* commit '2079274c45e679a31cfde2331114de7bcf04ccc0':
  改为直接获取sitecenter内容,缓存会出问题
master
superman 9 years ago
parent
commit
4d95cd9bd0
  1. 2
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  2. 4
      designer_base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java
  3. 4
      designer_base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java

2
designer_base/src/com/fr/design/extra/PluginWebBridge.java

@ -36,8 +36,6 @@ public class PluginWebBridge {
private UIDialog uiDialog; private UIDialog uiDialog;
public static final String PLUGIN_SHOP = SiteCenter.getInstance().acquireUrlByKind("plugin.plist");
public static PluginWebBridge getHelper() { public static PluginWebBridge getHelper() {
if (helper != null) { if (helper != null) {
return helper; return helper;

4
designer_base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java

@ -1,8 +1,8 @@
package com.fr.design.extra.exe; package com.fr.design.extra.exe;
import com.fr.design.extra.PluginWebBridge;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -38,7 +38,7 @@ public class GetPluginFromStoreExecutor implements Executor {
@Override @Override
public void run(Process<String> process) { public void run(Process<String> process) {
StringBuilder url = new StringBuilder(PluginWebBridge.PLUGIN_SHOP); StringBuilder url = new StringBuilder(SiteCenter.getInstance().acquireUrlByKind("plugin.plist"));
if (StringUtils.isNotBlank(category)) { if (StringUtils.isNotBlank(category)) {
url.append("&cid=").append(category.split("-")[1]); url.append("&cid=").append(category.split("-")[1]);
} }

4
designer_base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java

@ -1,8 +1,8 @@
package com.fr.design.extra.exe; package com.fr.design.extra.exe;
import com.fr.design.extra.PluginWebBridge;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -34,7 +34,7 @@ public class SearchOnlineExecutor implements Executor {
@Override @Override
public void run(Process<String> process) { public void run(Process<String> process) {
try { try {
HttpClient httpClient = new HttpClient(PluginWebBridge.PLUGIN_SHOP + "&keyword=" + keyword); HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("plugin.plist") + "&keyword=" + keyword);
result = httpClient.getResponseText(); result = httpClient.getResponseText();
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save