Commit 9ae290f4 by 姜雷

修改为登录后强行刷新

parent 58815359
const removeConsolePlugin = [];
// if (process.env.NODE_ENV === 'production') {
// removeConsolePlugin.push('transform-remove-console');
// }
if (process.env.NODE_ENV === 'production') {
removeConsolePlugin.push('transform-remove-console');
}
module.exports = {
presets: ['@vue/app'],
......
......@@ -148,15 +148,14 @@ export default {
console.log('login done');
this.loading = false;
if (
userRoles.find(
let dashboardPage = userRoles.find(
item => item.menuCode === process.env.VUE_APP_DASHBOARD_CODE
) &&
this.$router.options.base === '/'
) {
this.$router.push({ name: 'dashboard' });
);
if (dashboardPage && this.$router.options.base === '/') {
window.location.href =
location.origin + '/' + dashboardPage.menuLink;
} else {
this.$router.push({ path: '/' });
window.location.href = location.origin;
}
})
.catch(err => {
......
......@@ -23,6 +23,7 @@ class SystemShell {
this.storeModule = storeModule;
this.mixinModule = mixinModule;
this.utils = utilsModule;
this.createBaseFetch = createBaseFetch;
}
createSystem = ({
basePath = '/',
......@@ -71,6 +72,5 @@ class SystemShell {
});
return app;
};
createBaseFetch = createBaseFetch;
}
export default new SystemShell();
......@@ -21,7 +21,7 @@ routeNameList.map(name => {
const System = manageShell.default;
System.createSystem({
export default System.createSystem({
basePath: process.env.VUE_APP_BASE_URL,
routers: allAasyncRouterMap,
routeFilter: (routes, allRoute) => {
......
......@@ -4,7 +4,6 @@ import user from './modules/user/index';
import customer from './modules/customer/index';
Vue.use(Vuex);
console.log('in store');
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