Commit 3f77e4d6 authored by 乐宝呗666's avatar 乐宝呗666

修改路径配置

parent cd166b23
......@@ -75,9 +75,14 @@ const routes= [
},
]
function getAbsolutePath () {
let path = location.pathname
return path.substring(0, path.lastIndexOf('/') + 1)
}
const router = new VueRouter({
routes: routes,
mode: "history"
mode: "history",
base: getAbsolutePath()
})
const whiteList =['/login','/success','/screen']
router.beforeEach((to, from, next) => {
......
......@@ -13,8 +13,10 @@ const publicPath = '/h5/'
module.exports = {
publicPath, // 根据你的实际情况更改这里
lintOnSave: true,
productionSourceMap: false,
devServer: {
publicPath, // 和 publicPath 保持一致
open: true,
disableHostCheck: false,
https: false,
hotOnly: false, // See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#configuring-proxy
......@@ -30,7 +32,11 @@ module.exports = {
}
},
css: {
loaderOptions: {
sass: {
prependData: `@import "~@/assets/style/public.scss";`,
},
}
},
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
......
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