Skip to content

Commit

Permalink
Merge pull request #32 from a54552239/dev
Browse files Browse the repository at this point in the history
修复首页空白的问题
  • Loading branch information
a54552239 authored Feb 24, 2020
2 parents 2e22b97 + a103279 commit 1cf7eab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import {createRoute, isTokenExpired} from "../assets/js/utils";
import config from "../config/config";
import {refreshAccessToken} from "../api/common/common";

let HOME_PAGE = config.HOME_PAGE;
const currentOrganization = getStore('currentOrganization', true);
if (currentOrganization) {
HOME_PAGE = HOME_PAGE + '/' + currentOrganization.code;
}

Vue.use(Router);
const routes = [].concat(
Home
Expand Down Expand Up @@ -124,7 +130,6 @@ router.beforeEach((to, from, next) => {
});
}
}
const HOME_PAGE = config.HOME_PAGE;
//页面中转
if (to.name === 'index' || to.path === '/index' || to.path === '/') {
next({path: HOME_PAGE});
Expand Down
5 changes: 5 additions & 0 deletions src/views/member/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@
this.loginBtn = false;
this.$router.addRoutes(routes);
let redirect = this.$route.query.redirect || config.HOME_PAGE + '/' + org.code;
if (redirect == config.HOME_PAGE) {
redirect = config.HOME_PAGE + '/' + org.code
}
console.log('redirect');
console.log(redirect);
this.$router.push({
path: redirect
});
Expand Down

0 comments on commit 1cf7eab

Please sign in to comment.