index.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>无限潜能</title>
  8. <link rel="stylesheet" href="./css/index.css">
  9. <script src="./utils/size.js"></script>
  10. </head>
  11. <body>
  12. <div class="container">
  13. <img class="bg" src="./image/index/indexbg.jpg" alt="">
  14. <a href="./view/question.html" class="btn"></a>
  15. </div>
  16. <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
  17. <script>
  18. //获取用户信息
  19. var jionData = {
  20. "code": GetQueryString('code')
  21. };
  22. if(jionData.code){
  23. $.ajax({
  24. url: "https://readertest.lingjiao.cn/activity/wx/ucenter/wxlogin",
  25. type: 'GEt',
  26. contentType:'application/json;charset=utf-8',
  27. data: jionData,
  28. success: function (userData) {
  29. //alert(JSON.stringify(userData.data))
  30. localStorage.setItem('userData', JSON.stringify(userData.data));
  31. },
  32. error: function (e) {
  33. //alert(JSON.stringify(e))
  34. //alert('已失效,请重新打开')
  35. }
  36. });
  37. }
  38. </script>
  39. </body>
  40. </html>