Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
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
吴迪
gs1
Commits
af8a740b
Commit
af8a740b
authored
Dec 24, 2021
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改打包环境配置
parent
804e1a2c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
.env.development
.env.development
+1
-0
.eslintrc.js
.eslintrc.js
+4
-3
index.vue
src/views/Home/index.vue
+2
-2
vue.config.js
vue.config.js
+3
-3
No files found.
.env.development
View file @
af8a740b
NODE_ENV = "development"
VUE_APP_CURRENTMODE = "development"
VUE_APP_CURRENTMODE = "development"
VUE_APP_HOST_URL = "http://81.68.189.225:9091"
VUE_APP_HOST_URL = "http://81.68.189.225:9091"
VUE_APP_API_URL = "/"
VUE_APP_API_URL = "/"
...
...
.eslintrc.js
View file @
af8a740b
...
@@ -8,10 +8,10 @@ module.exports = {
...
@@ -8,10 +8,10 @@ module.exports = {
'eslint:recommended'
'eslint:recommended'
],
],
rules
:
{
rules
:
{
'no-console'
:
process
.
env
.
NODE_ENV
!==
'development
'
?
'error'
:
'off'
,
'no-console'
:
process
.
env
.
NODE_ENV
===
'production
'
?
'error'
:
'off'
,
'no-debugger'
:
process
.
env
.
NODE_ENV
!==
'development
'
?
'error'
:
'off'
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production
'
?
'error'
:
'off'
},
},
parserOptions
:
{
parserOptions
:
{
parser
:
'babel-eslint'
parser
:
'babel-eslint'
}
}
}
}
\ No newline at end of file
src/views/Home/index.vue
View file @
af8a740b
...
@@ -990,7 +990,7 @@ export default {
...
@@ -990,7 +990,7 @@ export default {
},
},
getCustomService
()
{
getCustomService
()
{
let
service
=
localStorage
.
getItem
(
"gs-custom-service"
)
||
""
;
let
service
=
localStorage
.
getItem
(
"gs-custom-service"
)
||
""
;
console
.
log
(
"getCustomService-----------"
,
service
);
//
console.log("getCustomService-----------", service);
if
(
service
)
{
if
(
service
)
{
service
=
JSON
.
parse
(
service
);
service
=
JSON
.
parse
(
service
);
this
.
showCustomService
(
service
);
this
.
showCustomService
(
service
);
...
@@ -1097,7 +1097,7 @@ export default {
...
@@ -1097,7 +1097,7 @@ export default {
},
},
// 商品全球身份证
// 商品全球身份证
async
homeNewGtin
()
{
async
homeNewGtin
()
{
console
.
log
(
process
.
env
,
"process.env"
);
console
.
log
(
process
.
env
.
NODE_ENV
,
"process.env"
);
this
.
$http
this
.
$http
.
get
(
`
${
process
.
env
.
VUE_APP_GDS_URL
}
/Data/NewGtin`
)
.
get
(
`
${
process
.
env
.
VUE_APP_GDS_URL
}
/Data/NewGtin`
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
...
vue.config.js
View file @
af8a740b
...
@@ -6,7 +6,7 @@ const resolve = dir => {
...
@@ -6,7 +6,7 @@ const resolve = dir => {
return
path
.
join
(
__dirname
,
dir
)
return
path
.
join
(
__dirname
,
dir
)
}
}
const
BASE_URL
=
process
.
env
.
NODE_ENV
!==
"development
"
const
BASE_URL
=
process
.
env
.
NODE_ENV
===
"production
"
?
"/"
?
"/"
:
"/"
:
"/"
...
@@ -16,7 +16,7 @@ module.exports = {
...
@@ -16,7 +16,7 @@ module.exports = {
indexPath
:
"index.html"
,
//生成的html路径
indexPath
:
"index.html"
,
//生成的html路径
filenameHashing
:
true
,
//生成文件名中包含hash
filenameHashing
:
true
,
//生成文件名中包含hash
productionSourceMap
:
false
,
productionSourceMap
:
false
,
lintOnSave
:
process
.
env
.
NODE_ENV
!==
"development
"
,
// 是否保存时limt代码
lintOnSave
:
process
.
env
.
NODE_ENV
===
"production
"
,
// 是否保存时limt代码
runtimeCompiler
:
true
,
//是否使用编译器
runtimeCompiler
:
true
,
//是否使用编译器
chainWebpack
:
config
=>
{
chainWebpack
:
config
=>
{
config
.
resolve
.
alias
config
.
resolve
.
alias
...
@@ -25,7 +25,7 @@ module.exports = {
...
@@ -25,7 +25,7 @@ module.exports = {
},
},
css
:
{
css
:
{
modules
:
false
,
//启动css Modules
modules
:
false
,
//启动css Modules
extract
:
process
.
env
.
NODE_ENV
!==
"development
"
,
//css分离插件
extract
:
process
.
env
.
NODE_ENV
===
"production
"
,
//css分离插件
loaderOptions
:
{
loaderOptions
:
{
css
:
{
css
:
{
localIdentName
:
"[path]-[name]-[local]-[hash:base64:5]"
,
localIdentName
:
"[path]-[name]-[local]-[hash:base64:5]"
,
...
...
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