Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
recruiting-management
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
recruiting-management
Commits
887db0d8
Commit
887db0d8
authored
Aug 21, 2019
by
xuezj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跨域调试
parent
e79652bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
index.js
config/index.js
+1
-1
prod.config.js
src/config/prod.config.js
+2
-0
http.service.js
src/service/http.service.js
+1
-2
No files found.
config/index.js
View file @
887db0d8
...
@@ -14,7 +14,7 @@ module.exports = {
...
@@ -14,7 +14,7 @@ module.exports = {
},
},
// Various Dev Server settings
// Various Dev Server settings
host
:
'
192.168.28.1
0
'
,
// can be overwritten by process.env.HOST
host
:
'
0.0.0.
0
'
,
// can be overwritten by process.env.HOST
port
:
8080
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
port
:
8080
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
true
,
autoOpenBrowser
:
true
,
errorOverlay
:
true
,
errorOverlay
:
true
,
...
...
src/config/prod.config.js
View file @
887db0d8
// todo: 测试环境部署的时候对xyqb.com进行替换,先改成这样进行测试,上线改回来
const
sapi
=
'
//recruit.xyqb.com
'
const
sapi
=
'
//recruit.xyqb.com
'
// const sapi = '//api.stantoo.com'
export
{
export
{
sapi
sapi
...
...
src/service/http.service.js
View file @
887db0d8
...
@@ -4,7 +4,7 @@ import {Notice} from 'iview'
...
@@ -4,7 +4,7 @@ import {Notice} from 'iview'
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
var
instance
=
axios
.
create
({});
var
instance
=
axios
.
create
({});
instance
.
defaults
.
timeout
=
2500
;
instance
.
defaults
.
timeout
=
2500
;
instance
.
defaults
.
withCredentials
=
true
;
// instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
// instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
instance
.
defaults
.
headers
.
post
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded
'
;
instance
.
defaults
.
headers
.
post
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded
'
;
...
@@ -16,7 +16,6 @@ instance.interceptors.request.use(function (config) {
...
@@ -16,7 +16,6 @@ instance.interceptors.request.use(function (config) {
if
(
!
config
.
headers
[
'
Content-Type
'
])
{
if
(
!
config
.
headers
[
'
Content-Type
'
])
{
config
.
headers
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded
'
config
.
headers
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded
'
}
}
config
.
withCredentials
=
true
;
return
config
;
return
config
;
},
function
(
error
)
{
},
function
(
error
)
{
// 对请求错误做些什么
// 对请求错误做些什么
...
...
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