| | |
| | | public static int RANK_TYPE_TIME = 1;// 实时
|
| | | public static int RANK_TYPE_DAY = 2;// 全天榜
|
| | | public static int RANK_TYPE_HOT = 3;// 热推榜
|
| | | public static int RANK_TYPE_REBUY = 4;// 复购榜
|
| | |
|
| | | /**
|
| | | * 各大榜单
|
| | |
| | | if (cid != null)
|
| | | params.put("cid", cid + "");
|
| | | params.put("sign", getSign(params, app.getAppSecret()));
|
| | | String result = HttpUtil.get("https://openapi.dataoke.com/api/goods/get-ranking-list", params, new HashMap<>());
|
| | | // 做2次请求
|
| | | String result = null;
|
| | | try {
|
| | | result = HttpUtil.get("https://openapi.dataoke.com/api/goods/get-ranking-list", params, new HashMap<>());
|
| | | } catch (Exception e) {
|
| | | result = HttpUtil.get("https://openapi.dataoke.com/api/goods/get-ranking-list", params, new HashMap<>());
|
| | | }
|
| | | JSONObject json = JSONObject.fromObject(result);
|
| | | if (json != null) {
|
| | | JSONArray array = json.optJSONArray("data");
|