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()