admin
2019-09-22 b9f8ef2c4737b6e6be4b12fc8f7bafb033bfcfe5
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java
@@ -33,6 +33,7 @@
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.jd.JDUtil;
import net.sf.json.JSONObject;
@@ -154,7 +155,7 @@
      } else {// 老人
         data.put("userTimeType", 1);
      }
      data.put("hotFuctionLink", configService.get("hot_function_url"));
      data.put("hotFuctionLink",configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));
      out.print(JsonUtil.loadTrueResult(data));
   }
@@ -242,14 +243,36 @@
   @RequestMapping(value = "getWebConfig", method = RequestMethod.POST)
   public void getWebConfig(AcceptData acceptData, String url, PrintWriter out) {
      JSONObject data = new JSONObject();
      if (url != null && (url.contains("s.click") || url.contains("taobao.com") || url.contains("tmall.com")
      if (url != null && url.contains("ifeeds.tmall.com/article.html?")) {
         if (VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion()))
            data.put("baichuan", false);
         else
            data.put("baichuan", true);
         data.put("goodsDetail", false);
      } else if (url != null && (url.contains("s.click") || url.contains("taobao.com") || url.contains("tmall.com")
            || url.contains("m.tb.cn"))) {
         data.put("baichuan", true);// 采用阿里百川的方式加载webview
         if (VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion()))
            data.put("baichuan", false);
         else
            data.put("baichuan", true);
         data.put("goodsDetail", true);// 需要拦截商品详情
      } else if (url != null && (url.contains("jd.com"))) {
         // 不能包含详情页
         String skuId = JDUtil.parseJDSkuIdByUrl(url);
         if (StringUtil.isNullOrEmpty(skuId))// 不能拦截详情页面,防止前端进入死循环
            if (url.startsWith("https://union-click.jd.com/jdc?"))
               data.put("goodsDetail", false);
            else
               data.put("goodsDetail", true);
         else
            data.put("goodsDetail", false);
         data.put("baichuan", false);// 不需要采用阿里百川的方式加载webview
         data.put("goodsDetail", true);// 不需要拦截商品详情
      } else if (url != null && (url.contains("yangkeduo.com"))) {
      } else if (url != null && ((url.contains("yangkeduo.com") && !url.contains("yangkeduo.com/goods.html?")
            && !url.contains("yangkeduo.com/duo_coupon_landing.html?"))
            || (url.startsWith("https://p.pinduoduo.com/")))) {
         data.put("baichuan", false);// 不需要采用阿里百川的方式加载webview
         data.put("goodsDetail", true);// 不需要拦截商品详情
      } else {