Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
a0138363
Commit
a0138363
authored
Mar 19, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
5841a2f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
11 deletions
+51
-11
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+51
-11
No files found.
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
a0138363
...
...
@@ -18,7 +18,7 @@ class UtilsNeedSve extends AppServiceBase {
async
getCenterToken
()
{
var
self
=
this
;
var
reqTokenUrl
=
this
.
centerChannelUrl
+
"/
web
/auth/accessAuth/getAppTokenByAppKey"
;
var
reqTokenUrl
=
this
.
centerChannelUrl
+
"/
api
/auth/accessAuth/getAppTokenByAppKey"
;
var
reqParam
=
self
.
appInfo
[
"aliyuntmtransfer"
];
if
(
!
reqParam
.
appkey
||
!
reqParam
.
secret
)
{
return
system
.
getResult
(
null
,
"reqType类型有误,请求失败"
);
...
...
@@ -49,6 +49,7 @@ class UtilsNeedSve extends AppServiceBase {
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
self
=
this
;
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
...
...
@@ -82,7 +83,7 @@ class UtilsNeedSve extends AppServiceBase {
}
}
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/
web
/opreceive/need/springBoard"
;
url
=
settings
.
centerChannelUrl
()
+
"/
api
/opreceive/need/springBoard"
;
var
token
=
tokenInfo
.
data
.
token
;
var
rtn
=
null
;
var
self
=
this
;
...
...
@@ -96,17 +97,56 @@ class UtilsNeedSve extends AppServiceBase {
return
system
.
getResult
(
null
,
"execPost is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
async
paySuccess
(
pobj
)
{
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
var
userpin
=
""
;
if
(
pobj
.
mobile
)
{
//获取用户userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{
"channelUserId"
:
pobj
.
mobile
,
"mobile"
:
pobj
.
mobile
,
"userName"
:
pobj
.
mobile
}
};
// pobj.actionBody.channelUserId = pobj.mobile;//渠道用户id,没有则用手机号
// pobj.actionBody.mobile = pobj.mobile;//用户手机号
var
url
=
settings
.
centerChannelUrl
()
+
"/web/auth/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
&&
userpinResultTmp
.
status
!=
2060
)
{
return
system
.
getResultFail
(
-
99
,
"获取userpin失败"
);
}
userpin
=
userpinResultTmp
.
data
.
userpin
;
if
(
!
userpin
)
{
return
system
.
getResultFail
(
-
88
,
"获取userpin失败!!"
);
}
}
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/web/opreceive/need/springBoard"
;
var
token
=
tokenInfo
.
data
.
token
;
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
// var url = settings.centerChannelUrl() + "/web/opreceive/need/springBoard";
// var rtn = await this.execlient.execPostTK(sobj, url, tokenInfo.data.token);
// var self = this;
// return {
// "requestId": self.getUUID(),
// "success": true,
// "errorMsg": "",
// "errorCode": "ok"
// };
}
}
...
...
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