|
|
@ -112,12 +112,11 @@ public class PluginOperateUtils { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("plugin.plist") + "&keyword=" + keyword);
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(keyword)) { |
|
|
|
if (StringUtils.isBlank(keyword)) { |
|
|
|
getRecommendPlugins(jsCallback); |
|
|
|
getRecommendPlugins(jsCallback); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
HttpClient httpClient = new HttpClient("http://shop.finereport.com/searchApi?type=all" + "&keyword=" + keyword); |
|
|
|
HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.store") + "&keyword=" + keyword); |
|
|
|
httpClient.asGet(); |
|
|
|
httpClient.asGet(); |
|
|
|
String result = httpClient.getResponseText(); |
|
|
|
String result = httpClient.getResponseText(); |
|
|
|
JSONObject jsonObject = new JSONObject(result); |
|
|
|
JSONObject jsonObject = new JSONObject(result); |
|
|
@ -135,8 +134,7 @@ public class PluginOperateUtils { |
|
|
|
new Thread(new Runnable() { |
|
|
|
new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
// String plistUrl = SiteCenter.getInstance().acquireUrlByKind("plugin.plist");
|
|
|
|
String plistUrl = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.plist") + "?"; |
|
|
|
String plistUrl = "http://shop.finereport.com/plugins" + "?"; |
|
|
|
|
|
|
|
boolean getRecommend = StringUtils.isEmpty(category) && StringUtils.isEmpty(seller) && StringUtils.isEmpty(fee); |
|
|
|
boolean getRecommend = StringUtils.isEmpty(category) && StringUtils.isEmpty(seller) && StringUtils.isEmpty(fee); |
|
|
|
if (getRecommend) { |
|
|
|
if (getRecommend) { |
|
|
|
getRecommendPlugins(jsCallback); |
|
|
|
getRecommendPlugins(jsCallback); |
|
|
@ -168,7 +166,7 @@ public class PluginOperateUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void getRecommendPlugins(JSCallback jsCallback) { |
|
|
|
public static void getRecommendPlugins(JSCallback jsCallback) { |
|
|
|
String plistUrl = "http://shop.finereport.com/ShopServer?pg=feature"; |
|
|
|
String plistUrl = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.feature"); |
|
|
|
try { |
|
|
|
try { |
|
|
|
HttpClient httpClient = new HttpClient(plistUrl.toString()); |
|
|
|
HttpClient httpClient = new HttpClient(plistUrl.toString()); |
|
|
|
String result = httpClient.getResponseText(); |
|
|
|
String result = httpClient.getResponseText(); |
|
|
@ -216,7 +214,7 @@ public class PluginOperateUtils { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
String result; |
|
|
|
String result; |
|
|
|
String url = "http://shop.finereport.com/shopServer?pg=category"; |
|
|
|
String url = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.category"); |
|
|
|
if (url != null) { |
|
|
|
if (url != null) { |
|
|
|
HttpClient httpClient = new HttpClient(url); |
|
|
|
HttpClient httpClient = new HttpClient(url); |
|
|
|
result = httpClient.getResponseText(); |
|
|
|
result = httpClient.getResponseText(); |
|
|
|