admin
2019-08-27 fe879975a3e8a0a1aa280fb839e02d159bfbcff8
fanli/src/main/java/com/yeshi/fanli/util/dataoke/DaTaoKeApiUtil.java
@@ -476,6 +476,7 @@
   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;// 复购榜
   /**
    * 各大榜单
@@ -493,7 +494,13 @@
      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");