...
|
...
|
@@ -44,7 +44,7 @@ class payModel extends global.yoho.BaseModel { |
|
|
return this.get({data: {
|
|
|
method: 'app.recommend.purchased',
|
|
|
productSkn: param.skn,
|
|
|
udid: param.uid,
|
|
|
uid: param.uid,
|
|
|
rec_pos: '100005',
|
|
|
limit: 2,
|
|
|
client_id: param.client_id
|
...
|
...
|
@@ -72,7 +72,9 @@ class payModel extends global.yoho.BaseModel { |
|
|
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')
|
|
|
_.get(result, 'data.pay_expire'),
|
|
|
order_goods: _.get(result, 'data.order_goods'),
|
|
|
package_info: _.get(result, 'data.package_info', [])
|
|
|
}
|
|
|
};
|
|
|
}
|
...
|
...
|
@@ -83,6 +85,8 @@ class payModel extends global.yoho.BaseModel { |
|
|
return Promise.resolve({});
|
|
|
}
|
|
|
|
|
|
param.uid.appVersion = _.get(global, 'yoho.config.appVersion');
|
|
|
|
|
|
return this.get({data: {
|
|
|
method: 'app.SpaceOrders.detail',
|
|
|
uid: param.uid,
|
...
|
...
|
@@ -95,21 +99,14 @@ class payModel extends global.yoho.BaseModel { |
|
|
|
|
|
// 购买此商品的用户也购买了,要先从订单详情获取商品skn
|
|
|
_getOthersBuy(param) {
|
|
|
return Promise.all([
|
|
|
this.getOtherDetail(param)
|
|
|
]).then((result) => {
|
|
|
|
|
|
let goodSkn = '';
|
|
|
this.getOtherDetail(param).then(result => {
|
|
|
let skn = _.get(result, 'data.order_goods.0.product_skn', '');
|
|
|
|
|
|
if (result && result[0] && result[0].data && result[0].data.order_goods) {
|
|
|
goodSkn = result[0].data.order_goods[0].product_skn;
|
|
|
if (skn) {
|
|
|
return this._getOthersBuy2(Object.assign(param, { skn: skn }));
|
|
|
} else {
|
|
|
return Promise.resolve([]);
|
|
|
}
|
|
|
|
|
|
return this._getOthersBuy2(Object.assign(param, { skn: goodSkn }));
|
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
|
return result;
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|