Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
operation-web-project
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7ba6bab0
authored
Sep 16, 2020
by
jack
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
test 部署
1 parent
371b25de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
src/http/api.js
src/http/api.js
View file @
7ba6bab
...
@@ -78,6 +78,12 @@ export default function $axios(options) {
...
@@ -78,6 +78,12 @@ export default function $axios(options) {
// IE9时response.data是undefined,因此需要使用response.request.responseText(Stringify后的字符串)
// IE9时response.data是undefined,因此需要使用response.request.responseText(Stringify后的字符串)
if
(
response
)
{
if
(
response
)
{
if
(
response
.
data
==
undefined
)
{
if
(
response
.
data
==
undefined
)
{
let
str
=
response
.
request
.
responseText
;
//判断未登录,未登录,后台会发送请求,返回一个html页面
if
(
str
.
indexOf
(
'广联赛讯运营平台'
)
>=
0
)
{
window
.
location
.
href
=
"http://sso.glsx.com.cn/#/login"
return
false
;
}
data
=
JSON
.
parse
(
response
.
request
.
responseText
)
data
=
JSON
.
parse
(
response
.
request
.
responseText
)
}
else
{
}
else
{
data
=
JSON
.
parse
(
response
.
data
)
data
=
JSON
.
parse
(
response
.
data
)
...
@@ -118,11 +124,11 @@ export default function $axios(options) {
...
@@ -118,11 +124,11 @@ export default function $axios(options) {
//特殊定义,不做处理
//特殊定义,不做处理
break
;
break
;
case
'-1'
:
case
'-1'
:
if
(
data
.
errId
==
'-200'
)
{
if
(
data
.
errId
==
'-200'
)
{
//window.refresh();
//window.refresh();
location
.
reload
();
location
.
reload
();
//window.reload()
//window.reload()
}
else
{
}
else
{
Util
.
Info
({
Util
.
Info
({
message
:
data
.
message
||
data
.
msg
||
'出错了,请联系管理员'
message
:
data
.
message
||
data
.
msg
||
'出错了,请联系管理员'
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment