Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
f6dcc54502f1933477e52a90b503b67f5ba6e6b9
1 parent
3d573fa2
update for sign
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
library/sign.js
library/sign.js
View file @
f6dcc54
...
...
@@ -38,7 +38,7 @@ const packageSort = argument => {
* @return {string} 生成的签名字符串
*/
const
makeSign
=
argument
=>
{
var
qs
=
[];
let
qs
=
[];
_
.
forEach
(
argument
,
function
(
value
,
key
)
{
qs
.
push
(
key
+
'='
+
_
.
trim
(
value
));
...
...
@@ -49,10 +49,12 @@ const makeSign = argument => {
// 生成API签名,调用后端接口的时候有私钥校验
exports
.
apiSign
=
(
params
)
=>
{
const
clientType
=
params
.
client_type
||
'web'
;
/* eslint-disable */
var
sign
=
packageSort
(
Object
.
assign
({
client_type
:
'h5'
,
private_key
:
privateKey
.
h5
,
let
sign
=
packageSort
(
Object
.
assign
({
client_type
:
clientType
,
private_key
:
privateKey
[
clientType
],
app_version
:
'3.8.2'
,
os_version
:
'yohobuy:h5'
,
screen_size
:
'720x1280'
,
...
...
Please
register
or
login
to post a comment