| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.jd.JDApiUtil;
|
| | | import com.yeshi.fanli.util.jd.JDUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Controller
|
| | | @RequestMapping("api/v2/config")
|
| | | public class ConfigControllerV2 {
|
| | |
|
| | |
| | | data.put("baichuan", true);// 采用阿里百川的方式加载webview
|
| | | 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.startsWith("https://p.pinduoduo.com/")))) {
|
| | | data.put("baichuan", false);// 不需要采用阿里百川的方式加载webview
|
| | | data.put("goodsDetail", true);// 不需要拦截商品详情
|
| | | } else {
|