Commit 2bc686c8 authored by levante's avatar levante

123

parent 6ab6a91b
...@@ -48,7 +48,6 @@ exports.cssLoaders = function (options) { ...@@ -48,7 +48,6 @@ exports.cssLoaders = function (options) {
return ExtractTextPlugin.extract({ return ExtractTextPlugin.extract({
use: loaders, use: loaders,
fallback: 'vue-style-loader', fallback: 'vue-style-loader',
publicPath: '../../'
}) })
} else { } else {
return ['vue-style-loader'].concat(loaders) return ['vue-style-loader'].concat(loaders)
......
...@@ -65,7 +65,7 @@ module.exports = { ...@@ -65,7 +65,7 @@ module.exports = {
// Paths // Paths
assetsRoot: path.resolve(__dirname, '../dist'), assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: './pc/', // 设置生产地址,否则生产环境下在子项目刷新页面会空白 assetsPublicPath: './', // 设置生产地址,否则生产环境下在子项目刷新页面会空白
/** /**
* Source Maps * Source Maps
......
...@@ -7,22 +7,9 @@ import Cookie from '@/util/local-cookie' ...@@ -7,22 +7,9 @@ import Cookie from '@/util/local-cookie'
Vue.use(Router) Vue.use(Router)
const router = new Router({ const router = new Router({
mode: 'hash', mode: 'history',
// base: process.env.NODE_ENV === 'development' ? '/' : '/portal/', base: process.env.NODE_ENV === 'development' ? '/' : '/pc/',
routes, 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 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