From 2116f27ba6a03d9dddcf575f689ab6504d5af4b8 Mon Sep 17 00:00:00 2001 From: xyq <392009588@qq.com> Date: Tue, 24 Oct 2023 10:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E7=AB=AF=E8=B6=85=E6=97=B6=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/permission.js b/src/permission.js index 6586238e..93c675f5 100644 --- a/src/permission.js +++ b/src/permission.js @@ -211,37 +211,37 @@ router.beforeEach((to, from, next) => { // }) next() }).catch(err => { - store.dispatch('LogOut').then(() => { - try { - let loginUrl = Cookies.get("_Login_url"); - if (loginUrl && loginUrl.indexOf("onlineHomeLogin") !== -1) { - next({ path: '/onlineHomeLogin' }) - return; - } - } catch (e) { console.log(e); } - // Message.error(err) - if ('/authenticRight'.indexOf(to.path) !== -1) { - next({ path: '/authenticRight/login' }) - } else if ('/homestead'.indexOf(to.path) !== -1) { - next({ path: '/homestead/login' }) - } else if (to.path.indexOf('/onlineHome') !== -1) { - //next(`/onlineHomeLogin`) - next(`/zjdLogin`) - } else if (to.path.indexOf('/yinnong') !== -1) { - next(`/yinnongLogin`) - } else if (window.location.href.indexOf('/sunVillage_info/') != -1) { - window.location.href = '/sunVillage_info/login'; - } else if (to.path.indexOf('/homesteadSurvey') !== -1) { - next(`/homesteadLogin`) - } else if (to.path.indexOf('/lawEnforcement') !== -1) { - next(`/lawEnforcement/login`) - } else if (to.path.indexOf('/sunVillage') !== -1) { - next(`/sunVillage/login`) - } else { - next(`/yinnongLogin`) - //next({ path: '/' }) - } - }) + // store.dispatch('LogOut').then(() => { + // try { + // let loginUrl = Cookies.get("_Login_url"); + // if (loginUrl && loginUrl.indexOf("onlineHomeLogin") !== -1) { + // next({ path: '/onlineHomeLogin' }) + // return; + // } + // } catch (e) { console.log(e); } + // // Message.error(err) + // if ('/authenticRight'.indexOf(to.path) !== -1) { + // next({ path: '/authenticRight/login' }) + // } else if ('/homestead'.indexOf(to.path) !== -1) { + // next({ path: '/homestead/login' }) + // } else if (to.path.indexOf('/onlineHome') !== -1) { + // //next(`/onlineHomeLogin`) + // next(`/zjdLogin`) + // } else if (to.path.indexOf('/yinnong') !== -1) { + // next(`/yinnongLogin`) + // } else if (window.location.href.indexOf('/sunVillage_info/') != -1) { + // window.location.href = '/sunVillage_info/login'; + // } else if (to.path.indexOf('/homesteadSurvey') !== -1) { + // next(`/homesteadLogin`) + // } else if (to.path.indexOf('/lawEnforcement') !== -1) { + // next(`/lawEnforcement/login`) + // } else if (to.path.indexOf('/sunVillage') !== -1) { + // next(`/sunVillage/login`) + // } else { + // next(`/yinnongLogin`) + // //next({ path: '/' }) + // } + // }) }) } else { next()