Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nodejs-yitong-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Metrics
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
yitong-public
nodejs-yitong-sdk
Commits
bb0b8bc6
Commit
bb0b8bc6
authored
May 10, 2021
by
孙傲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关键词调整 timestamp -> t
parent
026fc1fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
package.json
package.json
+1
-1
yitong-sdk.js
yitong-sdk.js
+2
-2
No files found.
package.json
View file @
bb0b8bc6
{
"name"
:
"nodejs-yitong-sdk"
,
"version"
:
"1.0.
2
"
,
"version"
:
"1.0.
3
"
,
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
yitong-sdk.js
View file @
bb0b8bc6
...
...
@@ -375,9 +375,10 @@ function auth(opts) {
function
track
(
opts
)
{
return
async
function
(
ctx
,
next
)
{
ctx
.
track
=
true
;
// 全部接口收集
let
t
=
Date
.
now
();
ctx
.
trackEvent
=
{
__referer__
:
`
${
opts
.
serviceName
}
:
${
ctx
.
path
}
`
,
t
imestamp
:
Date
.
now
()
,
t
:
t
,
app_key
:
ctx
.
getAppKey
()
||
_
.
get
(
ctx
.
token
,
'
aud
'
)
||
opts
.
appKey
,
event
:
{
key
:
'
api
'
...
...
@@ -388,7 +389,6 @@ function track(opts) {
user_id
:
_
.
get
(
ctx
.
token
,
'
sub
'
)
}
}
let
t
=
Date
.
now
();
try
{
await
next
();
}
finally
{
...
...
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