123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- html,body {
- padding: 0;
- margin: 0;
- width: 175px;
- height: 175px;
- text-align: center;
- }
- div {
- width: 175px;
- height: 175px;
- line-height: 175px;
- text-align: center;
- position: absolute;
- top: 0;
- left: 0;
- }
- .icon {
- display: inline-block;
- vertical-align: middle;
- width: 20px;
- height: 20px;
- }
- </style>
- </head>
- <body>
- <div class="impowerBox">
- <div class="wrp_code">
- <img class="icon" src="./right.png" alt="">
- 扫码成功
- </div>
- </div>
- <script src="./jquery-2.1.0.js"></script>
- <script>
- function GetRequest() {
- var url = decodeURI(location.search); //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for(var i = 0; i < strs.length; i ++) {
- theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- data = GetRequest();
- console.log(GetRequest())
- $.ajax({
- url: 'https://www.wenxingshuju.com/wx_douyin/v2/api/wx/scan?code='+data.code+'&state='+data.state,
- })
- </script>
- </body>
- </html>
|