admin
2019-04-12 176a83fedd71847a088bafb541b9a8877d6234b7
增加订单解析配置信息
1个文件已修改
21 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/ConfigController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/ConfigController.java
@@ -190,4 +190,25 @@
        }
        
    }
    /**
     * 订单解析配置
     * @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)}";
        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?,")));
        } catch (Exception e) {
            e.printStackTrace();
        }
        out.print(JsonUtil.loadTrueResult(data));
    }
}