Blame view

wxpayResult.html 2.7 KB
abaeb33e   liuqimichale   现在线上代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  <!doctype html>
  <html lang="en">
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <meta name="theme-color" content="#000000">
      <meta name="google" value="notranslate">
      <meta name="format-detection" content="telephone=no">
      <meta name="format-detection" content="email=no">
      <meta name="apple-mobile-web-app-capable" content="yes">
      <meta name="apple-mobile-web-app-status-bar-style" content="black">
      <meta http-equiv="Pragma" content="no-cache">
      <meta http-equiv="Cache-control" content="no-cache">
      <meta http-equiv="Cache" content="no-cache">
      <meta http-equiv="Expires" content="0">
      <script src="js/common.js"></script>
abaeb33e   liuqimichale   现在线上代码
17
  
abaeb33e   liuqimichale   现在线上代码
18
19
20
      <title>支付状态</title>
  </head>
  <body style="background-color: #f0f4f5;">
e4af9104   liuqimichale   去掉favicon.ico
21
  
d68fc748   liuqimichale   多笔缴纳费用
22
23
24
  <header id="header"
          style="margin-top:25%; display: flex; justify-content: center; align-items: center; flex-direction: column; ">
      <img id="stateImg" src="img/default.png" style="width: 64px; height: 64px; "/>
abaeb33e   liuqimichale   现在线上代码
25
26
27
      <div id="stateLable" style="font-size: 18px; color: #777; margin-top: 20px;">状态</div>
  </header>
  
abaeb33e   liuqimichale   现在线上代码
28
  
abaeb33e   liuqimichale   现在线上代码
29
30
  <script type="text/javascript">
  window.onload = function () {
d68fc748   liuqimichale   多笔缴纳费用
31
32
33
34
35
36
37
38
39
      var tmpParams = getQueryString(window.location);
      if (tmpParams != null) {
          console.log(JSON.stringify(tmpParams));
          if (tmpParams.trade_no == "success") {
              getResponse("success");
          } else {
              getResponse("fail");
          }
          //alertMsg("支付返回参数:" + JSON.stringify(tmpParams));
abaeb33e   liuqimichale   现在线上代码
40
      } else {
d68fc748   liuqimichale   多笔缴纳费用
41
          console.log("支付返回参数" + tmpParams);
abaeb33e   liuqimichale   现在线上代码
42
      }
abaeb33e   liuqimichale   现在线上代码
43
  }
d68fc748   liuqimichale   多笔缴纳费用
44
  
abaeb33e   liuqimichale   现在线上代码
45
46
  //type[fail、sucesss]
  function getResponse(type) {
d68fc748   liuqimichale   多笔缴纳费用
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      var img = document.getElementById("stateImg");
      var label = document.getElementById("stateLable");
      if (type == "fail") {
          img.src = "img/no.png";
          label.innerHTML = "支付失败,尝试重新扫码";
          setTimeout(function () {
              window.opener=null;
              window.open('','_self');
              window.location.href="about:blank";
              window.close();  //当断点执行到这里时会显示“Scripts may close only the windows that were opened by it.”所以要加上面“about:blank”页面才可以成功关闭
  
          }, 2000)
  
      } else {
          img.src = "img/ok.png";
          label.innerHTML = "订单支付成功";
          setTimeout(function () {
              window.opener=null;
              window.open('','_self');
              window.location.href="about:blank";
              window.close();  //当断点执行到这里时会显示“Scripts may close only the windows that were opened by it.”所以要加上面“about:blank”页面才可以成功关闭
  
          }, 2000)
      }
abaeb33e   liuqimichale   现在线上代码
71
72
73
74
75
76
  }
  </script>
  </body>
  
  
  </html>