Browse Source

Merge pull request #153 in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit '6c71ebed2b059e8295c0c26a69a48aa614a8419d':
  方法名修改
  REPORT-8962 10.0插件商城更新下载接口适配和脚本上传(修改url生成方式)
master
kerry 7 years ago
parent
commit
8db8620d8a
  1. 4
      designer-base/src/com/fr/design/extra/PluginUtils.java
  2. 2
      designer-base/src/com/fr/design/extra/PluginWebBridge.java
  3. 2
      designer-base/src/com/fr/design/extra/WebViewDlgHelper.java

4
designer-base/src/com/fr/design/extra/PluginUtils.java

@ -15,6 +15,7 @@ import com.fr.plugin.error.PluginErrorCode;
import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.view.PluginView;
import com.fr.stable.EncodeConstants;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import java.io.File;
@ -35,6 +36,7 @@ import java.util.Map;
public class PluginUtils {
private static final String ERROR_CODE_I18N_PREFIX = "FR-Plugin_Error_";
public static final String FR_VERSION = "fr_version";
public static PluginMarker createPluginMarker(String pluginInfo) {
@ -109,7 +111,7 @@ public class PluginUtils {
private static String getDownloadPath(String id) throws Exception {
HashMap<String, String> map = new HashMap<String, String>();
map.put("id", id);
HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.scripts_10"));
HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.script.download")+ "?" + FR_VERSION + "=" + ProductConstants.VERSION);
httpClient.asGet();
String resText = httpClient.getResponseText();
JSONObject resultJSONObject = new JSONObject(resText);

2
designer-base/src/com/fr/design/extra/PluginWebBridge.java

@ -559,7 +559,7 @@ public class PluginWebBridge {
uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));
}
public void updatePluginStore(final JSObject callback){
public void getPackInfo(final JSObject callback){
JSCallback jsCallback = new JSCallback(webEngine, callback);
jsCallback.execute(StringUtils.EMPTY);
}

2
designer-base/src/com/fr/design/extra/WebViewDlgHelper.java

@ -296,7 +296,7 @@ public class WebViewDlgHelper {
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.cv_10") + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION"));
HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.update") + "?" + PluginUtils.FR_VERSION + "=" + ProductConstants.VERSION + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION"));
httpClient.asGet();
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) {
String text = httpClient.getResponseText();

Loading…
Cancel
Save