|
|
|
@ -17,10 +17,11 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchMana
|
|
|
|
|
import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManager; |
|
|
|
|
import com.fr.general.ProcessCanceledException; |
|
|
|
|
import com.fr.general.http.HttpToolbox; |
|
|
|
|
import com.fr.json.JSON; |
|
|
|
|
import com.fr.json.JSONArray; |
|
|
|
|
import com.fr.json.JSONException; |
|
|
|
|
import com.fr.json.JSONFactory; |
|
|
|
|
import com.fr.json.JSONObject; |
|
|
|
|
import com.fr.json.JSONUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
@ -110,7 +111,7 @@ public class AlphaFineHelper {
|
|
|
|
|
|
|
|
|
|
public static SearchResult getModelListFromJSONArray(String result, String keyword) throws ClassCastException, JSONException { |
|
|
|
|
SearchResult allModelList = new SearchResult(); |
|
|
|
|
JSONArray jsonArray = (JSONArray) JSONUtils.jsonDecode(result); |
|
|
|
|
JSONArray jsonArray = JSONFactory.createJSON(JSON.ARRAY, result); |
|
|
|
|
for (int i = 0; i < jsonArray.length(); i++) { |
|
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
|
JSONObject jsonObject = jsonArray.optJSONObject(i); |
|
|
|
@ -128,6 +129,7 @@ public class AlphaFineHelper {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 网络异常时的处理 |
|
|
|
|
* |
|
|
|
|
* @param object |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
@ -153,6 +155,7 @@ public class AlphaFineHelper {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 判断网络是否异常 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public static boolean isNetworkOk() { |
|
|
|
|