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
3f5e64af
Commit
3f5e64af
authored
Jun 15, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ucommune api
parent
c4e61a5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
center-channel/app/base/api/impl/action/ucommune.js
+6
-4
center-channel/app/base/service/impl/utilsSve/utilsUcommuneSve.js
+18
-4
No files found.
center-channel/app/base/api/impl/action/ucommune.js
View file @
3f5e64af
...
@@ -22,13 +22,15 @@ class ProductAPI extends WEBBase {
...
@@ -22,13 +22,15 @@ class ProductAPI extends WEBBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"getUserInfo"
:
// 根据优客token获取用户信息,生成userPin返回前端
case
"getUserInfo"
:
// 根据优客token获取用户信息,生成userPin返回前端
actionBody
opResult
=
await
this
.
utilsUcommuneSve
.
getUserInfo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsUcommuneSve
.
getUserInfo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"orderConfirm"
:
// addOrder后调取支付
case
"orderTotalSum"
:
// addOrder后进入支付页面获取支付金额
opResult
=
await
this
.
utilsUcommuneSve
.
orderTotalSum
(
pobj
,
pobj
.
actionBody
);
case
"orderConfirm"
:
// 点击确认支付后返回拼接字符串
opResult
=
await
this
.
utilsUcommuneSve
.
orderConfirm
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsUcommuneSve
.
orderConfirm
(
pobj
,
pobj
.
actionBody
);
case
"
g
etOrderList"
:
// 优客调取订单列表用
case
"
UcommuneG
etOrderList"
:
// 优客调取订单列表用
opResult
=
await
this
.
utilsUcommuneSve
.
g
etOrderList
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsUcommuneSve
.
UcommuneG
etOrderList
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsUcommuneSve.js
View file @
3f5e64af
...
@@ -5,6 +5,7 @@ const AppServiceBase = require("../../app.base");
...
@@ -5,6 +5,7 @@ const AppServiceBase = require("../../app.base");
class
UtilsUcommuneService
extends
AppServiceBase
{
class
UtilsUcommuneService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
utilsAuthSve
=
system
.
getObject
(
"service.utilsSve.utilsAuthSve"
);
this
.
utilsAuthSve
=
system
.
getObject
(
"service.utilsSve.utilsAuthSve"
);
}
}
...
@@ -42,19 +43,32 @@ class UtilsUcommuneService extends AppServiceBase {
...
@@ -42,19 +43,32 @@ class UtilsUcommuneService extends AppServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
g
etOrderList
(
pobj
,
actionBody
)
{
async
UcommuneG
etOrderList
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
result
;
return
result
;
}
}
/**
/**
* addOrder后
前端调取支付用
* addOrder后
进入支付页面获取支付金额
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody channelItemCode 渠道产品编码
* @param {*} actionBody orderNo orderIndo订单号
*/
async
orderTotalSum
(
pobj
,
actionBody
)
{
pobj
.
actionType
=
"getOrderDetails"
// 获取订单详细信息 用来拼接字符串 totalsum为总金额,返回给前端
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
}
/**
* 点击确认支付后返回拼接字符串
* @param {*} pobj
* @param {*} actionBody orderNo orderIndo订单号
*/
*/
async
orderConfirm
(
pobj
,
actionBody
)
{
async
orderConfirm
(
pobj
,
actionBody
)
{
pobj
.
actionType
=
"getOrderDetails"
// 获取订单详细信息 用来拼接字符串 totalsum为总金额,返回给前端
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
}
}
//--------------------------------优客工厂相关接口--end----------------------------------------------------
//--------------------------------优客工厂相关接口--end----------------------------------------------------
...
...
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