Jelajahi Sumber

DEP 登录跳转

zhengjinyi 1 tahun lalu
induk
melakukan
1ee7739cec
1 mengubah file dengan 17 tambahan dan 10 penghapusan
  1. 17 10
      src/main/resources/static/js/account/login.js

+ 17 - 10
src/main/resources/static/js/account/login.js

@@ -84,16 +84,23 @@ var loginPage = new Vue({
                 };
                 _self.setStorages( _self.userData);
                 // 登录成功页面跳转
-                var loginBeforePath = getBaseCookie("loginBeforePath");
-                if (loginBeforePath && loginBeforePath!=='undefined' && loginBeforePath.indexOf('.html')>0) {
-                    delBaseCookie("loginBeforePath");
-                    window.location.href = loginBeforePath;
-                } else if (_self.userData.userIdentity*1 === 3) {
-                    location.href = '/supplier/dashboard.html';
-                } else if (_self.userData.userIdentity*1 === 2 || _self.userData.userIdentity*1 === 4) {
-                    location.href = '/user/dashboard.html';
-                } else {
-                    location.href="/index.html";
+                const loginBeforePath = getBaseCookie("loginBeforePath");
+                const partnerShopId = CAIMEI.Storage.getItem('partnerShopId')
+                if(partnerShopId){
+                    CAIMEI.Storage.removeItem('partnerShopId')
+                    CAIMEI.Storage.removeItem('partnerId')
+                    window.location.href=`/supplier-${partnerShopId}.html`
+                }else{
+                    if (loginBeforePath && loginBeforePath!=='undefined' && loginBeforePath.indexOf('.html')>0) {
+                        delBaseCookie("loginBeforePath");
+                        window.location.href = loginBeforePath;
+                    } else if (_self.userData.userIdentity*1 === 3) {
+                        location.href = '/supplier/dashboard.html';
+                    } else if (_self.userData.userIdentity*1 === 2 || _self.userData.userIdentity*1 === 4) {
+                        location.href = '/user/dashboard.html';
+                    } else {
+                        location.href="/index.html";
+                    }
                 }
             } else if(response.code === '-3'){//审核未通过
                 _self.text =response.msg;