Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
loan-manager-customer
Project
Project
Details
Activity
Releases
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
zhanhai
loan-manager-customer
Commits
41449a11
Commit
41449a11
authored
Mar 07, 2022
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ajax文件,根据环境变量读取
parent
5b124f15
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
4 deletions
+14
-4
.env.development
.env.development
+1
-0
.env.dr
.env.dr
+3
-0
.env.production
.env.production
+1
-0
.env.test
.env.test
+1
-0
README.md
README.md
+4
-1
package.json
package.json
+1
-0
index.html
public/index.html
+2
-2
ajax.js
src/utils/ajax.js
+1
-1
No files found.
.env.development
View file @
41449a11
NODE_ENV=development
VUE_APP_ENV=development
VUE_APP_API=http://47.99.245.36:8202
.env.dr
0 → 100644
View file @
41449a11
NODE_ENV=production
VUE_APP_ENV=production
VUE_APP_API=https://drwater.dingrongxd.com
.env.production
View file @
41449a11
NODE_ENV=production
VUE_APP_ENV=production
VUE_APP_API=https://water.jqtianxia.com
.env.test
View file @
41449a11
NODE_ENV
=
production
VUE_APP_ENV
=
test
VUE_APP_API
=
http
://
47.99
.
245.36
:
8202
README.md
View file @
41449a11
...
...
@@ -76,7 +76,10 @@ npm run serve
# 编译打包测试,读取.env.test环境配置
npm run build:test
# 编译打包生产,读取.env.production环境配置
# 编译打包到鼎荣,读取.env.dr环境配置
npm run build:dr
# 编译打包到金钱,读取.env.production环境配置
npm run build:prod
```
...
...
package.json
View file @
41449a11
...
...
@@ -8,6 +8,7 @@
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build:test"
:
"vue-cli-service build --mode test"
,
"build:dr"
:
"vue-cli-service build --mode dr --modern"
,
"build:prod"
:
"vue-cli-service build --mode production --modern"
},
"dependencies"
:
{
...
...
public/index.html
View file @
41449a11
...
...
@@ -13,13 +13,13 @@
//window.APIHOST = "http://192.168.0.50:8202";
//测试
//
window.APIHOST = "http://47.99.245.36:8202";
window
.
APIHOST
=
"http://47.99.245.36:8202"
;
//生产环境
//window.APIHOST = "https://water.jqtianxia.com";
//鼎荣小贷
window
.
APIHOST
=
"https://drwater.dingrongxd.com"
;
//
window.APIHOST = "https://drwater.dingrongxd.com";
</script>
</head>
...
...
src/utils/ajax.js
View file @
41449a11
...
...
@@ -6,7 +6,7 @@ import qs from 'qs'
import
Cookies
from
'js-cookie'
/** 测试环境 */
axios
.
defaults
.
baseURL
=
window
.
APIHOST
axios
.
defaults
.
baseURL
=
process
.
env
.
VUE_APP_API
;
/* 所有ajax请求拦截 */
axios
.
interceptors
.
request
.
use
(
function
(
req
)
{
const
token
=
Cookies
.
get
(
'x-auth-token'
)
...
...
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