Blame view

demo.html 2.84 KB
99b0761b   songchongxian   songcx无牌车扫码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  <!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
      <title></title>
      <style type="text/css">
          body {
              background: #009FE8;
              min-height: 100vh;
              font-family: "Microsoft Yahei", "Hiragino Sans GB", "Helvetica Neue", Helvetica, tahoma, arial, Verdana, sans-serif, "WenQuanYi Micro Hei", "\5B8B\4F53";
          }
  
          .main {
              position: relative;
              min-height: 100vh;
              /*background: url(http://api.91518lm.com/eFatlrQCyUQVBoalzBPS.png) no-repeat top center;*/
              background-size: 100%;
          }
  
          .btnbox {
              position: absolute;
              top: 45%;
              width: 100%;
              text-align: center;
          }
  
          .btn {
              width: 220px;
              font-size: 18px;
              font-weight: 500;
              background: #fff;
              color: #009FE8;
              border: 0;
              border-radius: 3px;
              -webkit-border-radius: 3px;
              -moz-border-radius: 3px;
              padding: 10px;
              margin-bottom: 15px;
          }
      </style>
  </head>
  <body>
      <div class="main">
          <div class="btnbox">
              <button class="btn" onclick="isMobile()">去支付</button>
              <button class="btn" onclick="returnUrl()">返回页面</button>
              <p style="color: #fff;font-size: 14px;"> QQ浏览器不支持打开支付宝 <br /> 请使用其他浏览器</p>
          </div>
      </div>
  </body>
  <script>
      window.location.href = "alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=http://api.doompay.com/trade/r/acefdc98a84e22b3bd0dceb0d233ee483c2c59126b107a4c8399ebf51698bb7104bf296a1d5e6008e2f981ae0657f9f79dcabe1662ca9f14a3e23fc1f50b20fe"
      function returnUrl() {
          window.location.href = "http://www.baidu.com"
      }
      function IsPC() {
          var userAgentInfo = navigator.userAgent;//通过window.navigator.userAgent来判断当前设备是IOS还是Android。
          var Agents = ["Android", "iPhone",
                      "SymbianOS", "Windows Phone",
                      "iPad", "iPod"];
          var flag = true;
          for (var v = 0; v < Agents.length; v++) {
              if (userAgentInfo.indexOf(Agents[v]) > 0) {
                  flag = false;
                  break;
              }
          }
          return flag;
      }
  
      function isMobile() {
          if (IsPC()) {
              alert("请在手机端,挑起支付");
          } else {
  
              window.location.href = "alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=http://api.doompay.com/trade/r/acefdc98a84e22b3bd0dceb0d233ee483c2c59126b107a4c8399ebf51698bb7104bf296a1d5e6008e2f981ae0657f9f79dcabe1662ca9f14a3e23fc1f50b20fe"
          }
      }
  
  </script>
  </html>