Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
478622e4
Commit
478622e4
authored
Nov 21, 2020
by
汪忙忙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: tornado api
parent
18d5f686
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
request.js
c_client/client/tbcc-sdk/lib/request.js
+7
-5
No files found.
c_client/client/tbcc-sdk/lib/request.js
View file @
478622e4
import
*
as
tb
from
'./tb'
;
const
{
getAuthUserInfo
}
=
tb
;
var
Buffer
=
require
(
"buffer"
).
Buffer
var
crypto
=
require
(
"crypto"
)
const
request
=
({
cloud
,
cloudName
,
requestType
=
'cloud'
,
mockUrl
})
=>
{
console
.
log
(
2
)
if
(
!
cloud
)
{
console
.
error
(
'请传入cloud'
);
return
false
;
...
...
@@ -51,13 +52,13 @@ const request = ({ cloud, cloudName, requestType = 'cloud', mockUrl }) => {
console
.
log
(
`params_`
,
params_
)
// nickName 转 md5 作为唯一的openId
if
(
!
nickName
)
{
tbcc
.
tb
.
getAuthUserInfo
().
catch
(
err
=>
{
return
getAuthUserInfo
().
catch
(
err
=>
{
console
.
log
(
'未授权成功'
,
err
);
}).
then
(
res
=>
{
cb
(
res
)
return
cb
(
res
)
})
}
// return cb({nickName: '卞龙亭'})
function
cb
({
nickName
})
{
if
(
!
db
||
!
proxyIp
)
{
my
.
confirm
({
...
...
@@ -112,7 +113,8 @@ const request = ({ cloud, cloudName, requestType = 'cloud', mockUrl }) => {
if
(
res
&&
res
.
success
)
{
resolve
(
res
);
}
else
{
reject
(
res
);
resolve
(
res
);
// reject(res);
}
}).
catch
(()
=>
{
hideMyLoading
();
...
...
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