孙志雷 5 years ago
parent
commit
835eb92ff6
1 changed files with 3 additions and 5 deletions
  1. 3 5
      index.html

+ 3 - 5
index.html

@@ -15,7 +15,6 @@
     </div>
     <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
     <script>
-
     //获取用户信息
      var jionData = {
         "code": GetQueryString('code')
@@ -28,8 +27,8 @@
             data: jionData,
             success: function (userData) {
                 //alert(JSON.stringify(userData.data))
-                //$('.btn').show();
-                //localStorage.setItem('userData', JSON.stringify(userData.data));
+                $('.btn').show();
+                localStorage.setItem('userData', JSON.stringify(userData.data));
             },
             error: function (e) {
                 //alert(JSON.stringify(e))
@@ -37,8 +36,7 @@
             }
         });
      } else {
-        $('.btn').show();
-        //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';
+        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>