Commit 3db68ddc by lichengming

修改了资源地址

parent 2bed61dc
...@@ -6,6 +6,13 @@ let envFilename = '.env.development' ...@@ -6,6 +6,13 @@ let envFilename = '.env.development'
if (process.env.NODE_ENV) { if (process.env.NODE_ENV) {
envFilename = '.env.' + process.env.NODE_ENV envFilename = '.env.' + process.env.NODE_ENV
} }
// 静态服务文件地址
let staticURL = 'http://static.patzn.com'
console.log('process.env.STATIC_URL==', process.env.STATIC_URL)
if (process.env.STATIC_URL) {
// 取各个配置文件中的 STATIC_URL
staticURL = process.env.STATIC_URL
}
module.exports = { module.exports = {
mode: 'universal', mode: 'universal',
server: { server: {
...@@ -22,13 +29,14 @@ module.exports = { ...@@ -22,13 +29,14 @@ module.exports = {
{ hid: 'description', name: 'description', content: pkg.description } { hid: 'description', name: 'description', content: pkg.description }
], ],
script: [ script: [
{ src: 'http://static.patzn.com/js/jquery-3.3.1.min.js' }, { src: staticURL + '/js/jquery-3.3.1.min.js' },
{ {
src: src:
'http://static.patzn.com/thirdparty/ztree/zTree_v3-3.5.29/js/jquery.ztree.all.min.js' staticURL +
'/thirdparty/ztree/zTree_v3-3.5.29/js/jquery.ztree.all.min.js'
}, },
{ {
src: 'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.js' src: staticURL + '/thirdparty/layx/layx-2.5.3.min.js'
}, },
{ {
src: src:
...@@ -39,29 +47,30 @@ module.exports = { ...@@ -39,29 +47,30 @@ module.exports = {
{ {
rel: 'icon', rel: 'icon',
type: 'image/x-icon', type: 'image/x-icon',
href: 'http://static.patzn.com/favicon.ico' href: staticURL + '/favicon.ico'
}, },
{ {
rel: 'stylesheet', rel: 'stylesheet',
href: href:
'http://static.patzn.com/thirdparty/ztree/zTree_v3-3.5.29/css/metroStyle/metroStyle.css' staticURL +
'/thirdparty/ztree/zTree_v3-3.5.29/css/metroStyle/metroStyle.css'
}, },
{ {
rel: 'stylesheet', rel: 'stylesheet',
href: 'http://static.patzn.com/thirdparty/ztree/menuStyle.css' href: staticURL + '/thirdparty/ztree/menuStyle.css'
}, },
{ {
rel: 'stylesheet', rel: 'stylesheet',
href: 'http://static.patzn.com/css/animate.css' href: staticURL + '/css/animate.css'
}, },
{ {
rel: 'stylesheet', rel: 'stylesheet',
href: 'http://static.patzn.com/theme/my-theme/main.css' href: staticURL + '/theme/my-theme/main.css'
}, },
{ rel: 'stylesheet', href: '', name: 'theme' }, { rel: 'stylesheet', href: '', name: 'theme' },
{ {
rel: 'stylesheet', rel: 'stylesheet',
href: 'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.css' href: staticURL + '/thirdparty/layx/layx-2.5.3.min.css'
} }
] ]
}, },
......
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