Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-account
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 9b6808fb
authored
Oct 16, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.2.1' into 'master'
加密 See merge request
!1
2 parents
947fdbeb
c6ac4815
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
src/api/request.js
src/api/request.js
View file @
9b6808f
...
...
@@ -3,22 +3,28 @@ import axios from 'axios'
import
qs
from
'qs'
// import GlsxVueCommon from 'glsx-vue-common'
import
sign
from
'./sign'
import
{
GlAxios
}
from
'glsx-vue-common'
const
request
=
(
params
=
{},
method
=
RequestMethods
.
GET
,
noSignAttr
=
[],
url
=
''
)
=>
{
import
{
GlAxios
}
from
'glsx-vue-common'
const
request
=
(
params
=
{},
method
=
RequestMethods
.
GET
,
noSignAttr
=
[],
url
=
''
)
=>
{
params
.
source
=
'glsx-oss-merchant-data'
params
.
appKey
=
'48e5e13229b82c1b4e6e8c96151f0637'
params
.
timestamp
=
new
Date
().
getTime
()
params
.
v
=
'1.0.0'
params
.
format
=
'json'
params
.
sessionAuth
=
'st'
// params.createBy = this.$get_session_config().user.id
var
data
=
sign
(
params
,
noSignAttr
)
if
(
url
)
{
return
axios
.
post
(
`
${
url
}
/router?method=
${
method
}
`
,
qs
.
stringify
(
data
))
}
return
method
===
RequestMethods
.
GET
?
GlAxios
.
get
(
'router'
,
{
params
:
sign
(
params
,
noSignAttr
)
})
:
GlAxios
.
post
(
'router'
,
data
)
return
method
===
RequestMethods
.
GET
?
GlAxios
.
get
(
'router'
,
{
params
:
sign
(
params
,
noSignAttr
),
})
:
GlAxios
.
post
(
'router'
,
data
)
}
export
default
request
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