| | |
| | | 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;
|
| | |
| | |
|
| | | } catch (Exception e) {
|
| | | errCode = 4;
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | try {
|
| | | 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)) {setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.finishPage();}</script>";
|
| | | out.print(script);
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "pinduoduo")
|
| | | public void pinDuoDuo(HttpServletResponse response) {
|
| | |
|