Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
national_museum_vod-H5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fubaole
national_museum_vod-H5
Commits
3f77e4d6
Commit
3f77e4d6
authored
Apr 07, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改路径配置
parent
cd166b23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
index.js
src/router/index.js
+6
-1
vue.config.js
vue.config.js
+7
-1
No files found.
src/router/index.js
View file @
3f77e4d6
...
...
@@ -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
)
=>
{
...
...
vue.config.js
View file @
3f77e4d6
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment