| | |
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.jd.JDUtil;
|
| | | import com.yeshi.fanli.util.suning.SuningUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.vipshop.VipShopUtil;
|
| | | import com.yeshi.fanli.vo.elme.ElemeConvertInfoResultVO;
|
| | | import com.yeshi.fanli.vo.homemodule.FloatImgDetailVO;
|
| | |
|
| | |
| | |
|
| | | data.put("baichuan", false);// 不需要采用阿里百川的方式加载webview
|
| | |
|
| | | } else if (url != null && (url.contains(".vip.com"))) {// 唯品会
|
| | | String goodsId = VipShopUtil.parseGoodsIdByUrl(url);
|
| | | if (StringUtil.isNullOrEmpty(goodsId))// 不能拦截详情页面,防止前端进入死循环
|
| | | data.put("goodsDetail", true);
|
| | | else
|
| | | data.put("goodsDetail", false);
|
| | | } else if (url != null && (url.contains(".suning.com"))) {// 苏宁
|
| | | String goodsId = SuningUtil.parseGoodsIdByUrl(url);
|
| | | if (StringUtil.isNullOrEmpty(goodsId))// 不能拦截详情页面,防止前端进入死循环
|
| | | data.put("goodsDetail", true);
|
| | | else
|
| | | data.put("goodsDetail", false);
|
| | | } 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/")))) {
|
| | |
| | | else
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @RequestMapping(value = "getKouBeiLink")
|
| | | public void getKouBeiLink(AcceptData acceptData, Long uid, String activityId, boolean share, boolean shareImg,
|
| | | String callback, PrintWriter out) {
|
| | |
| | |
|
| | | if (dto != null) {
|
| | | if (share) {// 生成口令
|
| | | String token = TaoKeApiUtil.getTKToken("http://", "口碑",dto.getClick_url() );
|
| | | String token = TaoKeApiUtil.getTKToken("http://", "口碑", dto.getClick_url());
|
| | | dto.setToken(TaoBaoUtil.filterTaoToken(token));
|
| | | }
|
| | | redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(dto), 60 * 60);// 缓存1个小时
|
| | |
| | | public void userProtocolListen(AcceptData acceptData, Long uid, int type, PrintWriter out) {
|
| | | LogHelper.userProtocolListen(String.format("%s#%s#%s", acceptData.getDevice(), uid, type));
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 是否显示广告
|
| | | * @Title: showAd
|
| | | * @Description: |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param out |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | @RequestMapping(value = "getShowAd")
|
| | | public void showAd(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | String value = configService.get(ConfigKeyEnum.showSplashAd.getKey());
|
| | | JSONObject data = new JSONObject();
|
| | | if ("0".equalsIgnoreCase(value.trim())) {
|
| | | data.put("show", false);
|
| | | } else {
|
| | | data.put("show", true);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | }
|