|
@@ -72,7 +72,8 @@ class payModel extends global.yoho.BaseModel { |
|
@@ -72,7 +72,8 @@ class payModel extends global.yoho.BaseModel { |
72
|
payment_amount: _.get(result, 'data.order_extInfo.payment_amount') ||
|
72
|
payment_amount: _.get(result, 'data.order_extInfo.payment_amount') ||
|
73
|
_.get(result, 'data.payment_amount'),
|
73
|
_.get(result, 'data.payment_amount'),
|
74
|
pay_expire: _.get(result, 'data.order_detail_info.ext.pay_expire') ||
|
74
|
pay_expire: _.get(result, 'data.order_detail_info.ext.pay_expire') ||
|
75
|
- _.get(result, 'data.pay_expire')
|
75
|
+ _.get(result, 'data.pay_expire'),
|
|
|
76
|
+ order_goods: _.get(result, 'data.order_goods')
|
76
|
}
|
77
|
}
|
77
|
};
|
78
|
};
|
78
|
}
|
79
|
}
|
|
@@ -95,21 +96,14 @@ class payModel extends global.yoho.BaseModel { |
|
@@ -95,21 +96,14 @@ class payModel extends global.yoho.BaseModel { |
95
|
|
96
|
|
96
|
// 购买此商品的用户也购买了,要先从订单详情获取商品skn
|
97
|
// 购买此商品的用户也购买了,要先从订单详情获取商品skn
|
97
|
_getOthersBuy(param) {
|
98
|
_getOthersBuy(param) {
|
98
|
- return Promise.all([
|
|
|
99
|
- this.getOtherDetail(param)
|
|
|
100
|
- ]).then((result) => {
|
99
|
+ this.getOtherDetail(param).then(result => {
|
|
|
100
|
+ let skn = _.get(result, 'data.order_goods.0.product_skn', '');
|
101
|
|
101
|
|
102
|
- let goodSkn = '';
|
|
|
103
|
-
|
|
|
104
|
- if (result && result[0] && result[0].data && result[0].data.order_goods) {
|
|
|
105
|
- goodSkn = result[0].data.order_goods[0].product_skn;
|
102
|
+ if (skn) {
|
|
|
103
|
+ return this._getOthersBuy2(Object.assign(param, { skn: skn }));
|
|
|
104
|
+ } else {
|
|
|
105
|
+ return Promise.resolve([]);
|
106
|
}
|
106
|
}
|
107
|
-
|
|
|
108
|
- return this._getOthersBuy2(Object.assign(param, { skn: goodSkn }));
|
|
|
109
|
-
|
|
|
110
|
- }).then((result) => {
|
|
|
111
|
-
|
|
|
112
|
- return result;
|
|
|
113
|
});
|
107
|
});
|
114
|
}
|
108
|
}
|
115
|
|
109
|
|