Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
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
常超
founder_vue
Commits
ab537164
Commit
ab537164
authored
Jan 07, 2022
by
米嘉伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_zwpt' of
http://47.92.108.28/changchao/founder_vue
into dev_zwpt
parents
ae562e8d
b0098973
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
src/netmgr/drFptx/drFptx.js
+2
-3
src/netmgr/xtfkgl/xtfkgl.js
+2
-2
src/request/http.js
+15
-6
No files found.
src/netmgr/drFptx/drFptx.js
View file @
ab537164
...
...
@@ -14,9 +14,8 @@ export default {
return
fHttp
.
postJson
(
_path
.
drFptx
+
url
,
_parameter
,
{
loading
:
false
,
fHttp
.
closeLoad
({
onUploadProgress
:
onProgress
})
})
)
},
}
src/netmgr/xtfkgl/xtfkgl.js
View file @
ab537164
...
...
@@ -53,8 +53,8 @@ export default {
},
queryGzl
(
_parameter
)
{
return
fHttp
.
post
(
_path
.
gzl
+
'queryByLogicIdAndType'
,
_parameter
,{
"Content-Type"
:
'application/x-www-form-urlencoded'
return
fHttp
.
post
(
_path
.
gzl
+
'queryByLogicIdAndType'
,
_parameter
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
},
}
src/request/http.js
View file @
ab537164
...
...
@@ -14,6 +14,13 @@ axios.defaults.headers = {
}
axios
.
defaults
.
responseType
=
'json'
var
_HTTP_TYPE
=
{
LOADING
:
'loading'
,
LOADING_TARGET
:
'loadingTarget'
,
TIP
:
'isShowTip'
}
var
common
=
axios
.
create
()
var
instance
=
axios
.
create
({
// post 常规请求
...
...
@@ -50,8 +57,8 @@ let initConfig = (config) => {
window
.
_axiosPromiseArr
.
push
({
cancel
})
})
// 判断当前请求是否设置了不显示Loading,默认显示
if
(
config
.
loading
!==
false
)
{
showLoading
(
config
.
loadingTarget
)
// 如果设置了targer,使用设置的target,比如el-table
if
(
config
[
_HTTP_TYPE
.
LOADING
]
!==
false
)
{
showLoading
(
config
[
_HTTP_TYPE
.
LOADING_TARGET
]
)
// 如果设置了targer,使用设置的target,比如el-table
}
// console.log('initConfig', config)
return
config
...
...
@@ -66,7 +73,8 @@ let onError = (error) => {
logger
.
error
(
'onError-error.toString'
,
error
.
toString
())
let
result
=
{
code
:
999
,
message
:
''
message
:
''
,
[
_HTTP_TYPE
.
TIP
]:
error
.
config
[
_HTTP_TYPE
.
TIP
]
}
if
(
error
.
toString
().
indexOf
(
'400'
)
>=
0
)
{
result
.
code
=
400
...
...
@@ -108,6 +116,7 @@ let onResponse = (response) => {
if
(
response
.
data
&&
response
.
data
.
code
>=
0
)
{
let
status
=
response
.
data
.
code
let
message
=
response
.
data
.
message
response
.
data
[
_HTTP_TYPE
.
TIP
]
=
response
.
config
[
_HTTP_TYPE
.
TIP
]
if
(
status
===
0
)
{
// return response.data
}
else
if
(
status
===
'200'
||
status
===
200
)
{
...
...
@@ -182,7 +191,7 @@ let handleError = (response) => {
break
}
if
(
isShowTip
!==
false
)
{
if
(
response
[
_HTTP_TYPE
.
TIP
]
!==
false
)
{
Message
({
message
:
message
,
type
:
type
...
...
@@ -295,12 +304,12 @@ export default {
},
closeTip
(
params
=
{})
{
// 关闭提示
params
.
isShowTip
=
false
params
[
_HTTP_TYPE
.
TIP
]
=
false
return
params
},
closeLoad
(
params
=
{})
{
// 关闭加载进度
params
.
loading
=
false
params
[
_HTTP_TYPE
.
LOADING
]
=
false
return
params
},
...
...
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