This commit is contained in:
cookfront
2017-04-19 15:41:08 +08:00
parent ea16b3353b
commit e6c4f9ebf2
4 changed files with 8 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ Vue.use(ZanUI.Lazyload, {
});
Vue.use(VueRouter);
const isProduction = process.env.NODE_ENV === 'production';
const routesConfig = routes(navConfig, true);
routesConfig.push({
path: '/',
@@ -22,7 +23,7 @@ routesConfig.push({
});
const router = new VueRouter({
mode: 'hash',
base: '/zanui/vue',
base: isProduction ? '/zanui/vue/' : __dirname,
routes: routesConfig
});