12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>学前能力测试</title>
- <link rel="stylesheet" href="./css/index.css">
- <script src="./utils/size.js"></script>
- </head>
- <body>
- <div class="container">
- <img class="bg" src="./image/index/indexbg.jpg" alt="">
- <a href="./view/question.html" class="btn"></a>
- </div>
- <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
- <script>
- //获取用户信息
- var jionData = {
- "code": GetQueryString('code')
- };
- if(jionData.code){
- $.ajax({
- url: "https://readertest.lingjiao.cn/activity/wx/ucenter/wxlogin",
- type: 'GEt',
- contentType:'application/json;charset=utf-8',
- data: jionData,
- success: function (userData) {
- //alert(JSON.stringify(userData.data))
- $('.btn').show();
- localStorage.setItem('userData', JSON.stringify(userData.data));
- },
- error: function (e) {
- //alert(JSON.stringify(e))
- //alert('已失效,请重新打开')
- }
- });
- } else {
- window.location = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx75a6f8d1b4a850d7&redirect_uri=https%3A%2F%2Factivity.lingjiao.cn%2Fanswer%2Findex.html&response_type=code&scope=snsapi_userinfo&state=12345#wechat_redirect';
- }
- </script>
- </body>
- </html>
|