Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
罗超
bigwood
Commits
2315c64a
Commit
2315c64a
authored
Dec 13, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
0270e134
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
request.ts
src/api/request.ts
+5
-0
No files found.
src/api/request.ts
View file @
2315c64a
...
@@ -17,14 +17,19 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{
...
@@ -17,14 +17,19 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{
msg
=
datas
??{}
msg
=
datas
??{}
let
token
=
""
;
let
token
=
""
;
let
key
=
""
;
let
key
=
""
;
let
groupId
=
""
let
timestamp
=
(
new
Date
()).
valueOf
();
let
timestamp
=
(
new
Date
()).
valueOf
();
if
(
localStorage
.
vuex
&&
JSON
.
parse
(
localStorage
.
vuex
).
user
?.
token
)
{
if
(
localStorage
.
vuex
&&
JSON
.
parse
(
localStorage
.
vuex
).
user
?.
token
)
{
token
=
Store
.
state
.
user
?.
token
?.
access_token
token
=
Store
.
state
.
user
?.
token
?.
access_token
key
=
Store
.
state
.
user
?.
secretKey
key
=
Store
.
state
.
user
?.
secretKey
}
}
if
(
localStorage
.
vuex
&&
JSON
.
parse
(
localStorage
.
vuex
).
user
?.
userDetail
)
{
groupId
=
Store
.
state
.
user
?.
userDetail
?.
groupId
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
var
postData
=
{
"groupId"
:
groupId
,
"msg"
:
msg
,
"msg"
:
msg
,
"cmd"
:
cmd
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"timestamp"
:
timestamp
,
...
...
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