wudada commited on
Commit
73b3231
1 Parent(s): 9dc5991

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +5 -8
index.html CHANGED
@@ -1,16 +1,13 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
-
4
  <head>
5
  <meta charset="UTF-8">
6
- <!--<script src="https://web-9gikcbug35bad3a8-1304825656.tcloudbaseapp.com/sdk/1.3.0/mplogin2.min.js"></script>
7
- <script src="https://web-9gikcbug35bad3a8-1304825656.tcloudbaseapp.com/sdk/1.3.0/cloud.js"></script>-->
8
  <title></title>
9
  </head>
10
 
11
  <body>
12
  <script>
13
- alert("href: "+location.href);
14
  var GWC = {
15
  version: '1.1.1',
16
  urlParams: {},
@@ -66,12 +63,12 @@
66
  baseUrl = "https://open.weixin.qq.com/connect/qrconnect";
67
  }
68
  //第一步,没有拿到code,跳转至微信授权页面获取code
69
- alert(appId);
70
  //alert("href: "+location.href);
71
  var url = document.location.toString();
72
  var arrUrl = url.split("?");
73
  //let currentHost = "https://wx-1257268355.cos-website.ap-shanghai.myqcloud.com";//arrUrl[0];
74
- alert("currentHost: "+location.href);
75
  redirectUri = GWC.appendParams(baseUrl, {
76
  'appid': appId,
77
  // 'redirect_uri': 'https://app-1257268355.cos-website.ap-shanghai.myqcloud.com',//location.href,
@@ -85,13 +82,13 @@
85
  });
86
  } else {
87
  //第二步,从微信授权页面跳转回来,已经获取到了code,再次跳转到实际所需页面
88
- alert("p.83-code:"+code);
89
  redirectUri = GWC.appendParams(GWC.urlParams['redirect_uri2'], {
90
  'code': code,
91
  'state': state
92
  });
93
  }
94
- alert("p.89-redirectUri:"+redirectUri);
95
  console.log(redirectUri);
96
  location.href = redirectUri;
97
  }
 
1
  <!DOCTYPE html>
2
  <html lang="en">
 
3
  <head>
4
  <meta charset="UTF-8">
 
 
5
  <title></title>
6
  </head>
7
 
8
  <body>
9
  <script>
10
+ //alert("href: "+location.href);
11
  var GWC = {
12
  version: '1.1.1',
13
  urlParams: {},
 
63
  baseUrl = "https://open.weixin.qq.com/connect/qrconnect";
64
  }
65
  //第一步,没有拿到code,跳转至微信授权页面获取code
66
+ // alert(appId);
67
  //alert("href: "+location.href);
68
  var url = document.location.toString();
69
  var arrUrl = url.split("?");
70
  //let currentHost = "https://wx-1257268355.cos-website.ap-shanghai.myqcloud.com";//arrUrl[0];
71
+ //alert("currentHost: "+location.href);
72
  redirectUri = GWC.appendParams(baseUrl, {
73
  'appid': appId,
74
  // 'redirect_uri': 'https://app-1257268355.cos-website.ap-shanghai.myqcloud.com',//location.href,
 
82
  });
83
  } else {
84
  //第二步,从微信授权页面跳转回来,已经获取到了code,再次跳转到实际所需页面
85
+ //alert("p.83-code:"+code);
86
  redirectUri = GWC.appendParams(GWC.urlParams['redirect_uri2'], {
87
  'code': code,
88
  'state': state
89
  });
90
  }
91
+ //alert("p.89-redirectUri:"+redirectUri);
92
  console.log(redirectUri);
93
  location.href = redirectUri;
94
  }