Commit 2bc686c8 authored by levante's avatar levante

123

parent 6ab6a91b
......@@ -48,7 +48,6 @@ exports.cssLoaders = function (options) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader',
publicPath: '../../'
})
} else {
return ['vue-style-loader'].concat(loaders)
......
......@@ -65,7 +65,7 @@ module.exports = {
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './pc/', // 设置生产地址,否则生产环境下在子项目刷新页面会空白
assetsPublicPath: './', // 设置生产地址,否则生产环境下在子项目刷新页面会空白
/**
* Source Maps
......
......@@ -7,22 +7,9 @@ import Cookie from '@/util/local-cookie'
Vue.use(Router)
const router = new Router({
mode: 'hash',
// base: process.env.NODE_ENV === 'development' ? '/' : '/portal/',
mode: 'history',
base: process.env.NODE_ENV === 'development' ? '/' : '/pc/',
routes,
})
// router.beforeEach((to, from, next) => {
// // TODO
// store.commit('setWebviewSrc', to.meta && to.meta.src) // 判断有src的话为需要嵌入iframe的子项目
// const token = Cookie.get('token')
// // 当前无token且不在login页面则推到登录页面
// if (to.path != '/login' && !token) {
// next('/login')
// } else {
// next()
// }
// })
export default router
This diff is collapsed.
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