pay.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta content="width=device-width,height=device-height,maximum-scale=1.0,user-scalable=no" name="viewport">
  6. <meta content="yes" name="apple-mobile-web-app-capable">
  7. <meta content="black" name="apple-mobile-web-app-status-bar-style">
  8. <meta content="telephone=no" name="format-detection">
  9. <title>联通头条流量包</title>
  10. <link rel="stylesheet" href="../tt/css/base.css">
  11. <link rel="stylesheet" href="../tt/css/pagerz.css">
  12. <script type="text/javascript" src="../public/libs/jquery-min.js"></script>
  13. </head>
  14. <body>
  15. <h1>今日头条定向流量包</h1>
  16. <input type="button" id="subscribe9" value="连续包月订购"><br><br>
  17. <input type="button" id="order9" value="当月月包订购">
  18. <h1>抖音定向流量权益包</h1>
  19. <input type="button" id="subscribe15" value="连续包月订购"><br><br>
  20. <input type="button" id="order15" value="当月月包订购">
  21. <h1>支付跳转测试</h1>
  22. <input type="text" id="link" style="width: 100%">
  23. <input type="button" value="跳转" id="go">
  24. <script type="text/javascript">
  25. $(function() {
  26. $("#subscribe9").on('click', function() {
  27. console.log(1)
  28. });
  29. $("#order9").on('click', function() {
  30. console.log(2)
  31. });
  32. $("#subscribe15").on('click', function() {
  33. console.log(3)
  34. });
  35. $("#order15").on('click', function() {
  36. console.log(4)
  37. });
  38. function orderBack() {
  39. function orderBack(stockcode, cpid) {
  40. var param = {
  41. "fes": query.fes,
  42. "sou": query.sou,
  43. "fog": product.fog,
  44. "userid": user.userid
  45. }
  46. if (!!stockcode && stockcode != '') {
  47. param.stockcode = stockcode;
  48. }
  49. return $.ajax({
  50. url: root + "-s1api" + '/backward/nanyanorder',
  51. type: "POST",
  52. contentType: "application/json",
  53. data: JSON.stringify(param)
  54. });
  55. }
  56. orderBack().then(function(response) {
  57. // console.log(response)
  58. compnt.hideLoading();
  59. var data = response;
  60. switch (data.resultCode) {
  61. case "0000":
  62. // compnt.showAlert('领取成功');
  63. // window.location.reload();
  64. // alert(data.web_url + '&redirect_url=' + encodeURIComponent(window.location.href + '&tradeno=' + data.out_trade_no));
  65. data.tradedate = unicom.getNowFormatDate();
  66. data.userid = unicom.user.userid;
  67. pay(data);
  68. break;
  69. default:
  70. compnt.showAlert(response.errorInfo);
  71. break;
  72. }
  73. }).fail(function(data) {
  74. compnt.hideLoading();
  75. })
  76. }
  77. $('#go').on('click', function() {
  78. if ($('#link').val() == null || $('#link').val() == '') {
  79. alert('请输入网址')
  80. }
  81. window.location.href = $('#link').val();
  82. });
  83. })
  84. </script>
  85. </body>
  86. </html>