123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <title>支付结果</title>
- <script type="text/javascript" charset="UTF-8"
- src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
- <script type="text/javascript" src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
- <style>
- body {
- background-color: #efeff4;
- }
- * {
- padding: 0;
- margin: 0;
- }
- .app {
- width: 100%;
- height: 100vh;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .app img {
- width: 73px;
- display: block;
- }
- .app span {
- font-size: 11px;
- text-align: center;
- margin: 21px 42px 41px;
- line-height: 21px;
- }
- .button {
- background-color: #00AE75;
- border-radius: 13px;
- font-size: 13px;
- line-height: 27px;
- color: #FFFFFF;
- padding: 0 12px;
- text-align: center;
- position: relative;
- text-decoration:none;
- }
- </style>
- </head>
- <body>
- <div class="app">
- <img src="./icon-success.68ddda96.png" alt="" />
- <span id="msg">购买成功!<br />请耐心等待并关注活动变动</span>
- <a class="button" id="backHome" href="javascript:;">返回活动首页</a>
- </div>
- </body>
- <script type="text/javascript">
- function getQueryString(name) {
- var query = window.location.search.substring(1);
- var vars = query.split("&");
- for (var i = 0; i < vars.length; i++) {
- var pair = vars[i].split("=");
- if (pair[0] == name) {
- return pair[1];
- }
- }
- return null;
- };
- var order_id = getQueryString("order_id");
- window.onload = function () {
- var mchData = {action: 'onIframeReady', displayStyle: 'SHOW_CUSTOM_PAGE'}
- var postData = JSON.stringify(mchData)
- parent.postMessage(postData, 'https://payapp.weixin.qq.com')
- }
- var url = location.href;
- if (url.indexOf('uat.') != -1) {
- //var jump = 'http://learn.uat.churenyiliao.com/active/#/pages/activities/order/order?id=' + order_id;
- var jump = 'http://learn.uat.churenyiliao.com/active/';
- var back = 'http://guanli.uat.churenyiliao.com/learn/active/?l=api.getDesc';
- } else {
- //var jump = 'https://learn.churenyiliao.com/active/#/pages/activities/order/order?id=' + order_id;
- var jump = 'https://learn.churenyiliao.com/active/';
- var back = 'https://www.churenyiliao.com/learn/active/?l=api.getDesc';
- }
-
- if (!order_id) {
- $('#msg').html('购买失败!<br />请耐心等待并关注活动变动');
- function jumpOut() {
- location.href = jump;
- }
- } else {
- function jumpOut() {
- var mchData = {action: 'jumpOut', jumpOutUrl: jump}
- var postData = JSON.stringify(mchData)
- parent.postMessage(postData, 'https://payapp.weixin.qq.com')
-
- }
- $.ajax({
- type: "GET",
- url: back,
- data: {
- id: order_id,
- json : 1
- },
- dataType: "json",
- success: function (data) {
- if (data.status == 1) {
- if (data.data.info.status == 2) {
- $('#msg').html('购买成功!<br />请耐心等待并关注活动变动');
- $('#backHome').click(function() {
- jumpOut();
- });
- } else {
- $('#msg').html('购买失败!<br />请耐心等待并关注活动变动');
- $('#backHome').click(function() {
- location.href = jump;
- });
- }
-
- } else {
- alert(data.msg);
- }
- }
- });
- }
-
- </script>
- </html>
|