浏览代码

微信登录

chao 4 年之前
父节点
当前提交
a2b8fa6436
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/main/resources/templates/we_chat/redirect_uri.html

+ 5 - 3
src/main/resources/templates/we_chat/redirect_uri.html

@@ -33,19 +33,21 @@
                 token: r.data.token
             };
             localStorage.setItem('userInfo',JSON.stringify(userData));
-            toPage();
+            tobeforePage();
         }else{
             if (wx_mode===2 && r.code===-4){
                 //微信绑定页面
                 window.location.href = '/bind.html';
+            }else if (wx_mode===1) {
+                tobeforePage();
             }else{
                 CAIMEI.Alert(r.msg,'确定',true, function(){
-                    toPage();
+                    tobeforePage();
                 });
             }
         }
     });
-    function toPage(){
+    function tobeforePage(){
         var loginBeforePath = getBaseCookie("loginBeforePath");
         if (loginBeforePath && loginBeforePath!='undefined' && loginBeforePath.indexOf('.html')>0) {
             delBaseCookie("loginBeforePath");