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
bb268fab
Commit
bb268fab
authored
Feb 14, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
206e07b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
center-channel/app/base/api/api.base.js
+10
-0
center-channel/app/base/api/impl/action/zcbusinesschanceApi.js
+10
-17
No files found.
center-channel/app/base/api/api.base.js
View file @
bb268fab
...
...
@@ -5,6 +5,7 @@ const uuidv4 = require('uuid/v4');
const
md5
=
require
(
"MD5"
);
class
APIBase
{
constructor
()
{
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
this
.
toolSve
=
system
.
getObject
(
"service.trademark.toolSve"
);
...
...
@@ -106,5 +107,14 @@ class APIBase {
}
//-----------------------新的模式------------------结束
async
restPostUrl
(
pobj
,
url
)
{
var
rtn
=
await
this
.
restClient
.
execPost
(
pobj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"restPost data is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
}
module
.
exports
=
APIBase
;
center-channel/app/base/api/impl/action/zcbusinesschanceApi.js
View file @
bb268fab
...
...
@@ -5,8 +5,6 @@ class PaymentAPI extends APIBase {
constructor
()
{
super
();
this
.
execlient
=
system
.
getObject
(
"util.execClient"
);
this
.
utilsProductSve
=
system
.
getObject
(
"service.utilsSve.utilsProductSve"
);
this
.
centerAppUrl
=
settings
.
centerAppUrl
();
}
/**
...
...
@@ -30,26 +28,20 @@ class PaymentAPI extends APIBase {
var
url
=
""
;
switch
(
action_type
)
{
// sy
case
"getQrCode"
:
//pc端订单支付二维码生成
url
=
this
.
centerAppUrl
+
"payment/paymentApi/getQrCode"
;
break
;
case
"queryOrder"
:
//通联支付查询
url
=
this
.
centerAppUrl
+
"payment/paymentApi/queryOrder"
;
break
;
case
"receiveCallBackNotify"
:
//通联支付查询
url
=
this
.
centerAppUrl
+
"payment/paymentApi/receiveCallBackNotify"
;
case
"needinfo2fq"
:
//pc端订单支付二维码生成
url
=
settings
.
centerOrderUrl
()
+
"action/zcbusinesschanceApi/springBoard"
;
break
;
// case "flowinfo"://pc端订单支付二维码生成
// opResult = await this.needinfoSve.flowinfo(needinfo);
// break;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
if
(
url
)
{
opResult
=
system
.
getResultSuccess
(
null
,
"action_type参数错误"
);
}
var
opResultstr
=
await
this
.
execlient
.
execPost
(
pobj
,
url
);
opResult
=
JSON
.
parse
(
opResultstr
.
stdout
)
return
opResult
;
// var url = settings.centerAppUrl() + "action/opProduct/springBoard";
return
await
this
.
restPostUrl
(
pobj
,
url
);
// return opResult;
}
}
module
.
exports
=
PaymentAPI
;
\ No newline at end of file
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