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
e1200e0c
Commit
e1200e0c
authored
Jul 12, 2021
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
977f55f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
18 deletions
+25
-18
hsWebHttpClient.js
dist/hsWebHttpClient.js
+22
-15
hsWebHttpClient.min.js
dist/hsWebHttpClient.min.js
+1
-1
root.js
src/root.js
+2
-2
No files found.
dist/hsWebHttpClient.js
View file @
e1200e0c
...
@@ -78,13 +78,17 @@ __webpack_require__.r(__webpack_exports__);
...
@@ -78,13 +78,17 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */
var
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
=
/*#__PURE__*/
__webpack_require__
.
n
(
hs_util_js__WEBPACK_IMPORTED_MODULE_1__
);
/* harmony import */
var
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
=
/*#__PURE__*/
__webpack_require__
.
n
(
hs_util_js__WEBPACK_IMPORTED_MODULE_1__
);
const
urlParam
=
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
().
SystemModule
.
getUrlParams
()
const
parseGlobalParams
=
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
().
SystemModule
.
parseGlobalParams
()
class
Root
{
class
Root
{
constructor
(
_axios
)
{
constructor
(
_axios
)
{
this
.
moduleName
=
'rootModule'
this
.
moduleName
=
'rootModule'
this
.
axios
=
_axios
||
(
axios__WEBPACK_IMPORTED_MODULE_0___default
())
this
.
axios
=
_axios
||
(
axios__WEBPACK_IMPORTED_MODULE_0___default
())
}
}
getParseGlobalParams
()
{
return
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
().
SystemModule
.
parseGlobalParams
()
}
getuUrlParam
()
{
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default
().
SystemModule
.
getUrlParams
()
}
filterEmptyValue
(
obj
)
{
filterEmptyValue
(
obj
)
{
if
(
!
obj
)
return
if
(
!
obj
)
return
const
emptyValues
=
[
null
,
undefined
,
'null'
,
'undefined'
,
NaN
]
const
emptyValues
=
[
null
,
undefined
,
'null'
,
'undefined'
,
NaN
]
...
@@ -118,15 +122,15 @@ class Root {
...
@@ -118,15 +122,15 @@ class Root {
delete
params
.
_user_info
delete
params
.
_user_info
delete
params
.
user_info
delete
params
.
user_info
const
replaceStr
=
{
const
replaceStr
=
{
'%'
:
"%25"
,
'%'
:
'%25'
,
'#'
:
"%23"
,
'#'
:
'%23'
,
'&'
:
"%26"
,
'&'
:
'%26'
,
'>'
:
"%3E"
,
'>'
:
'%3E'
,
'<'
:
"%3C"
,
'<'
:
'%3C'
,
'+'
:
"%2B"
,
'+'
:
'%2B'
,
'/'
:
"%2F"
,
'/'
:
'%2F'
,
'='
:
"3D"
,
'='
:
'3D'
,
':'
:
"3A"
':'
:
'3A'
}
}
const
replaceStrKeys
=
Object
.
keys
(
replaceStr
)
const
replaceStrKeys
=
Object
.
keys
(
replaceStr
)
for
(
let
k
in
params
)
{
for
(
let
k
in
params
)
{
...
@@ -137,10 +141,11 @@ class Root {
...
@@ -137,10 +141,11 @@ class Root {
})
})
params
[
k
]
=
value
params
[
k
]
=
value
}
}
}
}
}
}
getDbName
()
{
getDbName
()
{
const
parseGlobalParams
=
this
.
getParseGlobalParams
()
const
urlParam
=
this
.
getuUrlParam
()
if
(
urlParam
.
dbName
)
return
urlParam
.
dbName
if
(
urlParam
.
dbName
)
return
urlParam
.
dbName
if
(
parseGlobalParams
.
db_name
)
return
parseGlobalParams
.
db_name
if
(
parseGlobalParams
.
db_name
)
return
parseGlobalParams
.
db_name
return
''
return
''
...
@@ -155,9 +160,11 @@ class Root {
...
@@ -155,9 +160,11 @@ class Root {
//this.handleParams(params)
//this.handleParams(params)
params
&&
(
aixosCtx
.
params
=
params
)
params
&&
(
aixosCtx
.
params
=
params
)
if
(
aixosCtx
.
params
&&
aixosCtx
.
params
.
token
)
delete
aixosCtx
.
params
.
token
if
(
aixosCtx
.
params
&&
aixosCtx
.
params
.
token
)
delete
aixosCtx
.
params
.
token
if
(
aixosCtx
.
params
&&
aixosCtx
.
params
.
_user_info
)
delete
aixosCtx
.
params
.
_user_info
if
(
aixosCtx
.
params
&&
aixosCtx
.
params
.
_user_info
)
delete
aixosCtx
.
params
.
_user_info
// 给问号参数加上db_name,逻辑是 session中没有 就去取url上的
// 给问号参数加上db_name,逻辑是 session中没有 就去取url上的
if
(
!
aixosCtx
.
params
)
{
// 问号参数不存在时加一个参数
if
(
!
aixosCtx
.
params
)
{
// 问号参数不存在时加一个参数
aixosCtx
.
params
=
{
aixosCtx
.
params
=
{
db_name
:
this
.
getDbName
()
db_name
:
this
.
getDbName
()
}
}
...
...
dist/hsWebHttpClient.min.js
View file @
e1200e0c
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/root.js
View file @
e1200e0c
...
@@ -6,10 +6,10 @@ class Root {
...
@@ -6,10 +6,10 @@ class Root {
this
.
axios
=
_axios
||
axios
this
.
axios
=
_axios
||
axios
}
}
getParseGlobalParams
()
{
getParseGlobalParams
()
{
return
hsUtil
.
SystemModule
.
parseGlobalParams
()
return
hsUtil
.
SystemModule
.
parseGlobalParams
()
||
{}
}
}
getuUrlParam
()
{
getuUrlParam
()
{
hsUtil
.
SystemModule
.
getUrlParams
()
hsUtil
.
SystemModule
.
getUrlParams
()
||
{}
}
}
filterEmptyValue
(
obj
)
{
filterEmptyValue
(
obj
)
{
if
(
!
obj
)
return
if
(
!
obj
)
return
...
...
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