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
912781ca
Commit
912781ca
authored
Jul 27, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icp gateway
parent
31f2f411
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
15 deletions
+49
-15
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+49
-15
No files found.
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
912781ca
...
@@ -265,40 +265,68 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -265,40 +265,68 @@ class UtilsNeedSve extends AppServiceBase {
if
(
tokenInfo
.
status
!=
0
)
{
if
(
tokenInfo
.
status
!=
0
)
{
return
{
return
{
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
"success"
:
tru
e
,
"success"
:
fals
e
,
"errorMsg"
:
""
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
"errorCode"
:
"ok"
};
};
}
}
var
userpin
=
""
;
// 引用属性,channel依赖bizId order依赖intentionBizId
pobj
.
intentionBizId
=
pobj
.
bizId
var
sobj
=
{
var
sobj
=
{
"actionType"
:
"getItemByChannelSolutionNo"
,
"actionType"
:
"getItemByChannelSolutionNo"
,
"actionBody"
:
pobj
"actionBody"
:
pobj
}
}
//
带userpin请求
//
getItemByChannelSolutionNo
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
token
=
tokenInfo
.
data
.
token
;
var
token
=
tokenInfo
.
data
.
token
;
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
result
.
status
!=
0
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
{
return
{
"requestId"
:
self
.
getUUID
()
,
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
"errorCode"
:
"ok"
};
};
}
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
// 获取userpin
if
(
result
.
status
==
0
)
{
var
userparam
=
{
// return { "message": "true", "data": {}, "code": 200 }
actionType
:
"getLoginByUserName"
,
actionBody
:
{
"channelUserId"
:
result
.
data
.
channelUserId
,
"mobile"
:
result
.
data
.
publishMobile
,
"userName"
:
result
.
data
.
publishMobile
}
};
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
)
{
return
{
return
{
"requestId"
:
result
.
requestId
,
"requestId"
:
result
.
requestId
,
"success"
:
tru
e
,
"success"
:
fals
e
,
"errorMsg"
:
""
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
"errorCode"
:
"ok"
};
};
}
else
{
}
// return { "message": result.msg, "data": {}, "code": -102 }
// icpNotify
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
pobj
.
publishMobile
=
result
.
data
.
publishMobile
;
pobj
.
channelNeedNo
=
result
.
data
.
channelNeedNo
;
pobj
.
needNo
=
result
.
data
.
needNo
;
var
sobj
=
{
"actionType"
:
"icpNotify"
,
"actionBody"
:
pobj
}
var
result
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
!=
0
)
{
return
{
return
{
"requestId"
:
result
.
requestId
,
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"success"
:
false
,
...
@@ -306,6 +334,12 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -306,6 +334,12 @@ class UtilsNeedSve extends AppServiceBase {
"errorCode"
:
"ok"
"errorCode"
:
"ok"
};
};
}
}
return
{
"requestId"
:
result
.
requestId
,
"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