| | |
| | | @Aspect
|
| | | @Order(2)
|
| | | public class SignValidateAspect {
|
| | | public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*(..))";
|
| | | public static final String EDP = "execution(* com.yeshi.fanli.controller.client.v1.*.*(..))";
|
| | |
|
| | | public static String KEY = "";
|
| | |
|
| | |
| | | package com.yeshi.fanli.controller;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.io.PrintWriter;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.net.URLDecoder;
|
| | | import java.util.Date;
|
| | |
| | | if (errCode == 0)// 成功
|
| | | {
|
| | | if ("share".equalsIgnoreCase(source)) {
|
| | | response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=0");
|
| | | // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=0");
|
| | | closeWebPage(response.getWriter());
|
| | | } else if ("zigou".equalsIgnoreCase(source)) {
|
| | | response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=0");
|
| | | // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=0");
|
| | | closeWebPage(response.getWriter());
|
| | | } else if ("bind".equalsIgnoreCase(source)) {
|
| | | String script = String.format(
|
| | | "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href = 'yestv://toast#%s';setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.toast(\"恭喜你,淘宝绑定成功\");yestv.finishPage();}</script>",
|
| | |
| | | }
|
| | | } else {// 失败
|
| | | if ("share".equalsIgnoreCase(source)) {
|
| | | response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=1");
|
| | | // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=1");
|
| | | closeWebPage(response.getWriter());
|
| | | } else if ("zigou".equalsIgnoreCase(source)) {
|
| | | response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=1");
|
| | | // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=1");
|
| | | closeWebPage(response.getWriter());
|
| | | } else if ("bind".equalsIgnoreCase(source)) {
|
| | | String script = String.format(
|
| | | "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href = 'yestv://toast#%s';setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.toast(\"抱歉,淘宝绑定失败\");yestv.finishPage();}</script>",
|
| | |
| | |
|
| | | }
|
| | |
|
| | | private void closeWebPage(PrintWriter out) {
|
| | | String script = "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href = 'yestv://toast#%s';setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.finishPage();}</script>";
|
| | | out.print(script);
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "pinduoduo")
|
| | | public void pinDuoDuo(HttpServletResponse response) {
|
| | |
|
| | |
| | | @Resource
|
| | | private FloatADService floatADService;
|
| | |
|
| | | |
| | | /**
|
| | | * 首页配置信息
|
| | | *
|
| | |
| | |
|
| | | /**
|
| | | * 订单解析配置
|
| | | * |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getOrderParseConfig", method = RequestMethod.POST)
|
| | | public void getOrderParseConfig(AcceptData acceptData, PrintWriter out) {
|
| | | String orderJS = "var orderId= document.getElementById('tp-bought-root').getElementsByClassName('js-order-container')[0].getElementsByTagName('div')[0].getAttribute('data-id');";
|
| | | orderJS += "if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href='yestv://taobaoorder#'+orderId;} else {window.handle.showOrder(orderId)}";
|
| | | String orderJS = configService.get("taobao_order_parse_js");
|
| | | JSONObject data = new JSONObject();
|
| | | try {
|
| | | data.put("orderJS", DESUtil.encode(orderJS, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,")));
|
| | | data.put("orderUrl", DESUtil.encode( "https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm",StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,")));
|
| | | data.put("orderUrl", DESUtil.encode("https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm",
|
| | | StringUtil.getBase64String("YeShiFANLI889*+"), StringUtil.getBase64String("*M#34f?,")));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | else
|
| | | taoBaoLink = shareGoodsService.getTaoBaoLink(uid, auctionId,
|
| | | tbPidService.getIOSDefault().getPid());
|
| | | |
| | | } else
|
| | | taoBaoLink = shareGoodsService.getTaoBaoLinkForBuy(uid, auctionId, pidType);
|
| | | LogHelper.test("购买转链:默认PID转链-"+uid+":"+auctionId);
|
| | | }
|
| | | } else {// 不是返利库的商品,用特殊PID替代
|
| | | try {
|
| | |
| | | else
|
| | | taoBaoLink = shareGoodsService.getTaoBaoLink(uid, auctionId,
|
| | | tbPidService.getIOSDefault().getPid());
|
| | | |
| | | LogHelper.test("购买转链:默认PID转链-非返利库商品-"+uid+":"+auctionId);
|
| | | }
|
| | | }
|
| | | JSONObject link = new JSONObject();
|
| | |
| | | tbPid = tbPidService.getTBPid(uid, PidUser.TYPE_FANLI_IOS);
|
| | | }
|
| | |
|
| | | LogHelper.test("购买转链:默认PID转链-异常商品-"+uid+":"+auctionId);
|
| | |
|
| | | data.put("native", isNative);
|
| | |
|
| | | if (tbPid != null) {
|
| | |
| | | goodsJson.put("hongBao", hongBao);
|
| | |
|
| | | List<ClientTextStyleVO> labels = new ArrayList<>();
|
| | | labels.add(new ClientTextStyleVO("标签内容", "#F14242"));
|
| | | labels.add(new ClientTextStyleVO("标签内容", "#00FF00"));
|
| | | goodsJson.put("labels", labels);
|
| | |
|
| | | data.put("tbPidInfo", clientTBPid);
|
| | |
| | | goodsJson.put("shopInfo", tbShopInfo);
|
| | | }
|
| | |
|
| | | goodsJson.put("fanliValid",Math.random()>0.5? true:false);// 是否有返利
|
| | | goodsJson.put("fanliValid",true);// 是否有返利
|
| | |
|
| | | // 分享路径
|
| | | String shareUrl = String.format("%s?id=" + tb.getAuctionId(), Constant.systemCommonConfig.getAppShareInfoUrl());
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "configCache", key = "'listCacheSpecialToIndex'")
|
| | | @Cacheable(value = "configCache", key = "'listCacheSpecialToIndex'+#acceptData.platform+'-'+#acceptData.version")
|
| | | public JSONObject listCacheSpecialToIndex(AcceptData acceptData) throws Exception {
|
| | |
|
| | | // 首页-5圆形2排区域
|
| | |
| | | activityMap.put("bottomPicture", special.getBottomPicture());
|
| | | }
|
| | | }
|
| | | // 品牌券
|
| | | // >=1.5.40后的版本可以用
|
| | | if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 39)
|
| | | || "ios".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 48)
|
| | | if (listActivity != null)
|
| | | for (int i = 0; i < listActivity.size(); i++) {
|
| | | if ("品牌券".equalsIgnoreCase(listActivity.get(i).getName())) {
|
| | | listActivity.get(i).setJumpDetail(jumpDetailV2Service.getByTypeCache("hot_cakes"));
|
| | | }
|
| | | }
|
| | |
|
| | | handlelist(listActivity);
|
| | |
|
| | |
| | | blockJsonMap.put("bottomPicture", special.getBottomPicture());
|
| | | }
|
| | | }
|
| | |
|
| | | // 品牌券
|
| | | // >=1.5.40后的版本可以用
|
| | | if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 39)
|
| | | || "ios".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 48)
|
| | | if (listBlock != null)
|
| | | for (int i = 0; i < listBlock.size(); i++) {
|
| | | if ("品牌券".equalsIgnoreCase(listBlock.get(i).getName())) {
|
| | | listBlock.get(i).setJumpDetail(jumpDetailV2Service.getByTypeCache("hot_cakes"));
|
| | | }
|
| | | }
|
| | |
|
| | | // 数据处理
|
| | | handlelist(listBlock);
|
| | | blockJsonMap.put("list", JsonUtil.getApiCommonGson().toJson(listBlock));
|