Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hsWebHttpClient
Project
Project
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
何虹
hsWebHttpClient
Commits
958a65dd
Commit
958a65dd
authored
Dec 08, 2021
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化加入protoRequest
parent
5c669b2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
hsWebHttpClient.js
dist/hsWebHttpClient.js
+1
-1
hsWebHttpClient.min.js
dist/hsWebHttpClient.min.js
+1
-1
root.js
src/root.js
+25
-0
No files found.
dist/hsWebHttpClient.js
View file @
958a65dd
...
@@ -22169,7 +22169,7 @@ class Control {
...
@@ -22169,7 +22169,7 @@ class Control {
data
.
page_url
=
this
.
requestClient
.
pageName
data
.
page_url
=
this
.
requestClient
.
pageName
}
}
const
url
=
(
0
,
_common_commonModule__WEBPACK_IMPORTED_MODULE_0__
.
getPbWebDyncCode
)(
this
.
hasConfigDb
())
const
url
=
(
0
,
_common_commonModule__WEBPACK_IMPORTED_MODULE_0__
.
getPbWebDyncCode
)(
this
.
hasConfigDb
())
return
this
.
requestClient
.
post
(
url
,
data
,
getInitDbConfigParam
)
return
this
.
requestClient
.
post
(
url
,
data
,
this
.
getInitDbConfigParam
()
)
}
}
}
}
/* harmony default export */
__webpack_exports__
[
"default"
]
=
(
Control
);
/* harmony default export */
__webpack_exports__
[
"default"
]
=
(
Control
);
...
...
dist/hsWebHttpClient.min.js
View file @
958a65dd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/root.js
View file @
958a65dd
...
@@ -101,6 +101,31 @@ class Root {
...
@@ -101,6 +101,31 @@ class Root {
const
result
=
this
.
axios
(
aixosCtx
)
const
result
=
this
.
axios
(
aixosCtx
)
return
result
return
result
}
}
// 最原始的 protoRequest
protoRequest
(
options
=
{})
{
if
(
!
options
.
url
){
alert
(
'请传入url'
)
return
}
if
(
!
options
.
params
)
{
// 加一个默认的db_name
options
.
params
=
{
db_name
:
this
.
getDbName
()
}
}
else
if
(
options
.
params
&&
!
options
.
params
.
db_name
)
{
options
.
params
.
db_name
=
this
.
getDbName
()
}
// 删除问号参数上的token 和 _user_info
if
(
options
.
params
.
token
)
{
delete
options
.
params
.
token
}
if
(
options
.
params
.
_user_info
)
{
delete
options
.
params
.
_user_info
}
// 删除data中的空值
this
.
filterEmptyValue
(
options
.
data
)
return
this
.
axios
(
options
)
}
}
}
export
default
Root
export
default
Root
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