index.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. $.ajax({
  23. url: "https://readertest.lingjiao.cn/activity/wx/ucenter/wxlogin",
  24. type: 'GEt',
  25. contentType:'application/json;charset=utf-8',
  26. data: jionData,
  27. success: function (userData) {
  28. alert(JSON.stringify(userData.data))
  29. localStorage.setItem('userData', JSON.stringify(userData.data));
  30. },
  31. error: function () {
  32. alert('失败')
  33. }
  34. });
  35. </script>
  36. </body>
  37. </html>