Commit 9ae290f4 by 姜雷

修改为登录后强行刷新

parent 58815359
const removeConsolePlugin = []; const removeConsolePlugin = [];
// if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
// removeConsolePlugin.push('transform-remove-console'); removeConsolePlugin.push('transform-remove-console');
// } }
module.exports = { module.exports = {
presets: ['@vue/app'], presets: ['@vue/app'],
......
...@@ -148,15 +148,14 @@ export default { ...@@ -148,15 +148,14 @@ export default {
console.log('login done'); console.log('login done');
this.loading = false; this.loading = false;
if ( let dashboardPage = userRoles.find(
userRoles.find(
item => item.menuCode === process.env.VUE_APP_DASHBOARD_CODE item => item.menuCode === process.env.VUE_APP_DASHBOARD_CODE
) && );
this.$router.options.base === '/' if (dashboardPage && this.$router.options.base === '/') {
) { window.location.href =
this.$router.push({ name: 'dashboard' }); location.origin + '/' + dashboardPage.menuLink;
} else { } else {
this.$router.push({ path: '/' }); window.location.href = location.origin;
} }
}) })
.catch(err => { .catch(err => {
......
...@@ -23,6 +23,7 @@ class SystemShell { ...@@ -23,6 +23,7 @@ class SystemShell {
this.storeModule = storeModule; this.storeModule = storeModule;
this.mixinModule = mixinModule; this.mixinModule = mixinModule;
this.utils = utilsModule; this.utils = utilsModule;
this.createBaseFetch = createBaseFetch;
} }
createSystem = ({ createSystem = ({
basePath = '/', basePath = '/',
...@@ -71,6 +72,5 @@ class SystemShell { ...@@ -71,6 +72,5 @@ class SystemShell {
}); });
return app; return app;
}; };
createBaseFetch = createBaseFetch;
} }
export default new SystemShell(); export default new SystemShell();
...@@ -21,7 +21,7 @@ routeNameList.map(name => { ...@@ -21,7 +21,7 @@ routeNameList.map(name => {
const System = manageShell.default; const System = manageShell.default;
System.createSystem({ export default System.createSystem({
basePath: process.env.VUE_APP_BASE_URL, basePath: process.env.VUE_APP_BASE_URL,
routers: allAasyncRouterMap, routers: allAasyncRouterMap,
routeFilter: (routes, allRoute) => { routeFilter: (routes, allRoute) => {
......
...@@ -4,7 +4,6 @@ import user from './modules/user/index'; ...@@ -4,7 +4,6 @@ import user from './modules/user/index';
import customer from './modules/customer/index'; import customer from './modules/customer/index';
Vue.use(Vuex); Vue.use(Vuex);
console.log('in store');
const debug = process.env.NODE_ENV !== 'production'; const debug = process.env.NODE_ENV !== 'production';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment