|
@@ -7,6 +7,7 @@
|
|
|
<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;
|
|
@@ -50,27 +51,62 @@ src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
|
|
|
<body>
|
|
|
<div class="app">
|
|
|
<img src="./icon-success.68ddda96.png" alt="" />
|
|
|
- <span>购买成功!<br />请耐心等待并关注活动变动</span>
|
|
|
- <a class="button" onclick="jumpOut()" href="javascript:;">返回代理商系统</a>
|
|
|
+ <span id="msg">购买成功!<br />请耐心等待并关注活动变动</span>
|
|
|
+ <a class="button" id="backHome" onclick="jumpOut()" 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://daili.uat.churenyiliao.com/?act';
|
|
|
+ var back = 'http://guanli.uat.churenyiliao.com/learn/active/?l=api.getDesc';
|
|
|
+ } else {
|
|
|
+ var jump = 'https://daili.churenyiliao.com/?act';
|
|
|
+ var back = 'https://www.churenyiliao.com/learn/active/?l=api.getDesc';
|
|
|
+ }
|
|
|
function jumpOut() {
|
|
|
- var url = location.href;
|
|
|
- if (url.indexOf('uat.') != -1) {
|
|
|
- var jump = 'http://daili.uat.churenyiliao.com/';
|
|
|
- } else {
|
|
|
- var jump = 'https://daili.churenyiliao.com/';
|
|
|
- }
|
|
|
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 />请耐心等待并关注活动变动');
|
|
|
+ } else {
|
|
|
+ $('#msg').html('购买失败!<br />请耐心等待并关注活动变动');
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ alert(data.msg);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+});
|
|
|
</script>
|
|
|
</html>
|