Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2022-01-07 10:55:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
15fd481e96676bd78b059205350c67e29dfdc484
15fd481e
1 parent
0868105e
bug修正
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
src/utils/request.js
src/views/basicInformation/queryCargo/index.vue
src/utils/request.js
View file @
15fd481
import
axios
from
'axios'
import
{
Message
}
from
'element-ui'
import
{
Message
,
MessageBox
}
from
'element-ui'
import
store
from
'@/store'
import
{
getToken
}
from
'@/utils/auth'
import
errorCode
from
'@/utils/errorCode'
...
...
@@ -30,7 +30,7 @@ service.interceptors.request.use(config => {
for
(
const
propName
of
Object
.
keys
(
config
.
params
))
{
const
value
=
config
.
params
[
propName
];
var
part
=
encodeURIComponent
(
propName
)
+
"="
;
if
(
value
!==
null
&&
typeof
(
value
)
!==
"undefined"
)
{
if
(
value
!==
null
&&
typeof
(
value
)
!==
"undefined"
)
{
if
(
typeof
value
===
'object'
)
{
for
(
const
key
of
Object
.
keys
(
value
))
{
let
params
=
propName
+
'['
+
key
+
']'
;
...
...
@@ -59,15 +59,16 @@ service.interceptors.response.use(res => {
// 获取错误信息
const
msg
=
errorCode
[
code
]
||
res
.
data
.
msg
||
errorCode
[
'default'
]
if
(
code
===
301
)
{
this
.
$alert
(
'登录状态已过期,您可以继续留在该页面,或者重新登录'
,
'系统提示'
,
{
MessageBox
.
confirm
(
'登录状态已过期,您可以继续留在该页面,或者重新登录'
,
'系统提示'
,
{
confirmButtonText
:
'重新登录'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
type
:
'warning'
}
).
then
(()
=>
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
location
.
href
=
'/index'
;
})
})
;
})
}
else
if
(
code
===
403
)
{
//无权限页面
location
.
href
=
'/401'
;
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
15fd481
...
...
@@ -4,7 +4,7 @@
ref="cargoForm"
size="small"
:model="formData"
label-position="
left
"
label-position="
top
"
label-width="auto"
style="margin: 10px; width: 100%"
>
...
...
Please
register
or
login
to post a comment