Commit 69ef15ea by linboxuan

ucommune userToken return value

parent 52734adc
......@@ -33,6 +33,8 @@ class ProductAPI extends WEBBase {
break;
case "ucommuneGetOrderList":// 优客调取订单列表用
opResult = await this.utilsUcommuneSve.ucommuneGetOrderList(pobj, pobj.actionBody);
case "ucommuneGetOrderDetail":// 优客调取订单详情
opResult = await this.utilsUcommuneSve.ucommuneGetOrderDetail(pobj, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
......
......@@ -35,6 +35,8 @@ class UtilsUcommuneService extends AppServiceBase {
if(result.retCode == 0) { // 0成功 1失败
pobj.actionType = "getLoginByUserName";
pobj.actionBody.channelUserId = result.data.nationalCode + "-" + result.data.mobile; // 即:86_18512345678
pobj.actionBody.userName = result.data.name;
pobj.actionBody.headUrl = result.data.headImg;
pobj.actionBody.userpin = pobj.actionBody.userpin || this.getUUID();
var tmpOpResult = await this.utilsAuthSve.getLoginByUserName(pobj, pobj.actionBody);
if (tmpOpResult.status != 0 && tmpOpResult.status != 2060) {
......@@ -43,7 +45,7 @@ class UtilsUcommuneService extends AppServiceBase {
return system.getResultSuccess({ userpin: tmpOpResult.data.userpin ? tmpOpResult.data.userpin : pobj.actionBody.userpin})
} else {
// 获取用户信息失败
return system.getResult(null, "Failed to get user information, 100420");
return system.getResult(null, result);
}
}
/**
......@@ -111,6 +113,8 @@ class UtilsUcommuneService extends AppServiceBase {
return system.getResultSuccess(res.data)
}
return system.getResult(null, res.data);
// 之前写的 调用wx/alipay的方法,后续用不到会删掉
// let sign = await PayUtil.getSign(null,"1")
// let params = {
// "partner" : "2019022163300183" ,
......@@ -288,7 +292,7 @@ class UtilsUcommuneService extends AppServiceBase {
}
return system.getResult(null, res.data);
// 之前写的 调用wx/alipay的方法,后续用不到会删掉
// let sign = await PayUtil.getSign('wx6f3ebe44defe336a',"3")
// let wxpayJson = {
// "appid": "wx05b764a334ca0472",
......@@ -414,6 +418,9 @@ class UtilsUcommuneService extends AppServiceBase {
//--------------------------------优客工厂相关接口--end----------------------------------------------------
}
// 之前写的 调用wx/alipay的方法,后续用不到会删掉
PayUtil = {
getSign: async function(appid,paymentType) {
let requrl = "https://yf-api.gongsibao.com/pay/v1/createSign"
......
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