Authored by 毕凯

Merge branch 'hotfix/paydetail' into 'release/6.5.2'

pay-order-data



See merge request !1291
... ... @@ -56,6 +56,27 @@ class payModel extends global.yoho.BaseModel {
});
}
/**
* 处理订单详情新接口返回的数据,兼容旧接口数据格式
* @param {*} result
*/
_handleGoodsDetailData(result) {
return {
data: {
attribute: _.get(result, 'data.order_extInfo.attribute') ||
_.get(result, 'data.attribute'),
is_cancel: _.get(result, 'data.order_extInfo.is_cancel') ||
_.get(result, 'data.is_cancel'),
order_code: _.get(result, 'data.order_basic_info[0].value') ||
_.get(result, 'data.order_code'),
payment_amount: _.get(result, 'data.order_extInfo.payment_amount') ||
_.get(result, 'data.payment_amount'),
pay_expire: _.get(result, 'data.order_detail_info.ext.pay_expire') ||
_.get(result, 'data.pay_expire')
}
};
}
// 订单信息
getOtherDetail(param) {
if (!param.uid || !param.orderCode || !stringProcess.isNumeric(param.orderCode)) {
... ... @@ -68,7 +89,7 @@ class payModel extends global.yoho.BaseModel {
order_code: param.orderCode,
session_key: param.sessionKey
}, param: { code: 200 }}).then(result => {
return result;
return this._handleGoodsDetailData(result);
});
}
... ...
... ... @@ -13,10 +13,10 @@ const isTest = process.env.NODE_ENV === 'test';
const domains = {
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
// gray
// api: 'http://apigray.yoho.cn/',
... ... @@ -24,15 +24,16 @@ const domains = {
// platformApi: 'http://172.16.6.210:8088/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
global: 'http://api-global.yohobuy.com',
store: 'http://192.168.102.47:8080/portal-gateway/',
platformApi: 'http://192.168.102.48:8088/',
extstore: 'http://extstore-test1.yohops.com',
yohoNowApi: 'http://yohonow-test.yohops.com:9999/'
... ...