Commit 3f5e64af by linboxuan

Ucommune api

parent c4e61a5a
......@@ -22,13 +22,15 @@ class ProductAPI extends WEBBase {
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
case "getUserInfo":// 根据优客token获取用户信息,生成userPin返回前端
case "getUserInfo":// 根据优客token获取用户信息,生成userPin返回前端 actionBody
opResult = await this.utilsUcommuneSve.getUserInfo(pobj, pobj.actionBody);
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);
case "getOrderList":// 优客调取订单列表用
opResult = await this.utilsUcommuneSve.getOrderList(pobj, pobj.actionBody);
case "UcommuneGetOrderList":// 优客调取订单列表用
opResult = await this.utilsUcommuneSve.UcommuneGetOrderList(pobj, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
......
......@@ -5,6 +5,7 @@ const AppServiceBase = require("../../app.base");
class UtilsUcommuneService extends AppServiceBase {
constructor() {
super();
this.centerOrderUrl = settings.centerOrderUrl();
this.utilsAuthSve = system.getObject("service.utilsSve.utilsAuthSve");
}
......@@ -42,19 +43,32 @@ class UtilsUcommuneService extends AppServiceBase {
* @param {*} pobj
* @param {*} actionBody
*/
async getOrderList(pobj, actionBody) {
async UcommuneGetOrderList(pobj, actionBody) {
var reqUrl = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
/**
* addOrder后前端调取支付用
* addOrder后进入支付页面获取支付金额
* @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) {
pobj.actionType = "getOrderDetails" // 获取订单详细信息 用来拼接字符串 totalsum为总金额,返回给前端
var reqUrl = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
}
//--------------------------------优客工厂相关接口--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