mobile page

This commit is contained in:
cookfront 2017-04-11 19:59:11 +08:00
parent 5d19114571
commit aea610555f
2 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import VueRouter from 'vue-router';
import App from './ExamplesApp';
import navConfig from './nav.config.js';
import routes from './router.config';
import ZanUI from '../src/index';
import ZanUI from 'src/index';
import 'packages/zanui-css/src/index.css';

View File

@ -26,7 +26,6 @@ Vue.use(ZanUI.Lazyload, {
lazyComponent: true
});
let routesConfig = routes(navConfig);
routesConfig.push({
path: '/',
@ -44,9 +43,9 @@ router.beforeEach((route, redirect, next) => {
window.scrollTo(0, 0);
}
const pathname = process.env.NODE_ENV === 'production' ? '/vue/' : '/';
const pathname = process.env.NODE_ENV === 'production' ? '/vue/examples' : '/examples.html';
if (isMobile()) {
window.location.replace(pathname + 'examples.html#/');
window.location.replace(pathname);
return;
}
document.title = route.meta.title || document.title;