Browse Source

REPORT-81241【运营产品化二期】插件中心断网后的重新加载无反应

删除json字符串,用jsonarry写
feature/x
Link.Zhao 2 years ago
parent
commit
3d8e0d5e63
  1. 36
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineCloudConstants.java

36
designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineCloudConstants.java

@ -2,6 +2,10 @@ package com.fr.design.actions.help.alphafine;
import com.fr.design.i18n.Toolkit;
import com.fr.general.CloudCenter;
import com.fr.json.JSONArray;
import java.util.HashMap;
import java.util.Map;
/**
* 云端变量统一管理
@ -38,6 +42,9 @@ public class AlphaFineCloudConstants {
private static final String AF_HELP_MONTHLY_DOCUMENT = "af.help.monthly.document";
private static final String AF_RECOMMEND = "af.recommend";
private static final String LINK_NAME = "name";
private static final String LINK_URL = "link";
/**
* 获取插件搜索api
*/
@ -165,18 +172,23 @@ public class AlphaFineCloudConstants {
}
private static String getDefaultRecommend() {
String quickStartUrl = CloudCenter.getInstance().acquireUrlByKind(AF_HELP_QUICK_START);
String reportLearningPath = CloudCenter.getInstance().acquireUrlByKind(AF_HELP_REPORT_LEARNING_PATH);
String parameterLearningPath = CloudCenter.getInstance().acquireUrlByKind(AF_HELP_PARAM_LEARNING_PATH);
String fillLearningPath = CloudCenter.getInstance().acquireUrlByKind(AF_HELP_FILL_LEARNING_PATH);
String apiSummary = CloudCenter.getInstance().acquireUrlByKind(AF_HELP_API_SUMMARY);
String monthlyDocument = CloudCenter.getInstance().acquireUrlByKind(AF_HELP_MONTHLY_DOCUMENT);
return "[{\"name\":\"" + Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Quick_Start") + "\", \"link\":\"" + quickStartUrl + "\"}," +
"{\"name\":\"" + Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Report_Learning") + "\", \"link\":\"" + reportLearningPath + "\"}," +
"{\"name\":\"" + Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Parameter_Learning") + "\", \"link\":\"" + parameterLearningPath + "\"}," +
"{\"name\":\"" + Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Fill_Learning") + "\", \"link\":\"" + fillLearningPath + "\"}," +
"{\"name\":\"" + Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Api_Summary") + "\", \"link\":\"" + apiSummary + "\"}," +
"{\"name\":\"" + Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Monthly_Document") + "\", \"link\":\"" + monthlyDocument + "\"} ]";
String[][] links = new String[][]{
{Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Quick_Start"), CloudCenter.getInstance().acquireUrlByKind(AF_HELP_QUICK_START)},
{Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Report_Learning"), CloudCenter.getInstance().acquireUrlByKind(AF_HELP_REPORT_LEARNING_PATH)},
{Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Parameter_Learning"), CloudCenter.getInstance().acquireUrlByKind(AF_HELP_PARAM_LEARNING_PATH)},
{Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Fill_Learning"), CloudCenter.getInstance().acquireUrlByKind(AF_HELP_FILL_LEARNING_PATH)},
{Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Api_Summary"), CloudCenter.getInstance().acquireUrlByKind(AF_HELP_API_SUMMARY)},
{Toolkit.i18nText("Fine-Design_Report_AlphaFine_Doc_Monthly_Document"), CloudCenter.getInstance().acquireUrlByKind(AF_HELP_MONTHLY_DOCUMENT)}
};
JSONArray jsonArray = new JSONArray();
for (String[] link : links) {
Map<String, String> map = new HashMap<>();
map.put(LINK_NAME, link[0]);
map.put(LINK_URL, link[1]);
jsonArray.put(map);
}
return jsonArray.toString();
}
/**

Loading…
Cancel
Save