Commit 21839639 by linboxuan

ucommune api update

parent 3f5e64af
...@@ -58,6 +58,7 @@ class UtilsUcommuneService extends AppServiceBase { ...@@ -58,6 +58,7 @@ class UtilsUcommuneService extends AppServiceBase {
pobj.actionType = "getOrderDetails" // 获取订单详细信息 用来拼接字符串 totalsum为总金额,返回给前端 pobj.actionType = "getOrderDetails" // 获取订单详细信息 用来拼接字符串 totalsum为总金额,返回给前端
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;
} }
/** /**
...@@ -66,9 +67,34 @@ class UtilsUcommuneService extends AppServiceBase { ...@@ -66,9 +67,34 @@ class UtilsUcommuneService extends AppServiceBase {
* @param {*} actionBody orderNo orderIndo订单号 * @param {*} actionBody orderNo orderIndo订单号
*/ */
async orderConfirm(pobj, actionBody) { async orderConfirm(pobj, actionBody) {
await this.orderConfirmValidate(pobj, actionBody);
pobj.actionType = "getOrderDetails" // 获取订单详细信息 用来拼接字符串 totalsum为总金额,返回给前端 pobj.actionType = "getOrderDetails" // 获取订单详细信息 用来拼接字符串 totalsum为总金额,返回给前端
var reqUrl = this.centerOrderUrl + "action/order/springBoard"; var reqUrl = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var orderResult = await this.restPostUrl(pobj, reqUrl);
if(actionBody.payWay == 1) { // 支付宝
}
if(actionBody.payWay == 3) { // 微信
}
return system.getResult(null, "actionBody.payWay is eoor values,100450");
}
/**
* 点击确认支付后返回拼接字符串 orderConfirm 的验证数据方法
* @param {*} pobj
* @param {*} actionBody orderNo orderIndo订单号
*/
async orderConfirmValidate(pobj, actionBody) {
if(!actionBody.orderNo) { // 订单号
return system.getResult(null, "actionBody.orderNo can not be empty,100430");
}
if(!actionBody.payWay) { // 支付方式 1 支付宝 3微信
return system.getResult(null, "actionBody.payWay can not be empty,100440");
}
if(actionBody.payWay != 1 || actionBody.payWay != 3) { // payway 非1非3
return system.getResult(null, "actionBody.payWay is eoor values,100450");
}
} }
//--------------------------------优客工厂相关接口--end---------------------------------------------------- //--------------------------------优客工厂相关接口--end----------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment