1234567891011121314151617181920212223 |
- import router from "./router";
- const whiteList = [
- "/check",
- ];
- router.beforeEach((to, from, next) => {
- next();
- // 验证 TOKEN
- // if (getToken()) {
- // /* 登录成功 */
- // next();
- // } else {
- // /* 未登录 */
- // if (whiteList.indexOf(to.path) !== -1) {
- // // 在免登录白名单,直接进入
- // next();
- // } else {
- // // 否则全部重定向到登录页
- // window.location.href = 'http://10.8.11.123:8089/cas/login?service=http://localhost/check'
- // }
- // }
- });
|