|
@@ -162,30 +162,27 @@ exports.orderCompute = (req, res, next) => { |
|
@@ -162,30 +162,27 @@ exports.orderCompute = (req, res, next) => { |
162
|
let type = req.body.type;
|
162
|
let type = req.body.type;
|
163
|
|
163
|
|
164
|
if (type !== 'tickets') {
|
164
|
if (type !== 'tickets') {
|
|
|
165
|
+ let params = {
|
|
|
166
|
+ uid: uid,
|
|
|
167
|
+ cart_type: cartType,
|
|
|
168
|
+ delivery_way: deliveryId,
|
|
|
169
|
+ payment_type: paymentType,
|
|
|
170
|
+ coupon_code: couponCode,
|
|
|
171
|
+ use_yoho_coin: yohoCoin,
|
|
|
172
|
+ };
|
|
|
173
|
+
|
165
|
if (req.body.cartType === 'bundle') {
|
174
|
if (req.body.cartType === 'bundle') {
|
166
|
let activityInfo = JSON.parse(req.cookies['activity-info']);
|
175
|
let activityInfo = JSON.parse(req.cookies['activity-info']);
|
167
|
|
176
|
|
168
|
- cartModel.orderCompute({
|
|
|
169
|
- uid: uid,
|
|
|
170
|
- cartType: cartType,
|
|
|
171
|
- deliveryWay: deliveryId,
|
|
|
172
|
- paymentType: paymentType,
|
|
|
173
|
- couponCode: couponCode,
|
|
|
174
|
- yohoCoin: yohoCoin,
|
177
|
+ cartModel.orderCompute(_.assign(params, {
|
175
|
activityInfo: activityInfo
|
178
|
activityInfo: activityInfo
|
176
|
- }).then(result => {
|
179
|
+ })).then(result => {
|
177
|
res.json(result);
|
180
|
res.json(result);
|
178
|
}).catch(next);
|
181
|
}).catch(next);
|
179
|
} else {
|
182
|
} else {
|
180
|
- cartModel.orderCompute({
|
|
|
181
|
- uid: uid,
|
|
|
182
|
- cartType: cartType,
|
|
|
183
|
- deliveryWay: deliveryId,
|
|
|
184
|
- paymentType: paymentType,
|
|
|
185
|
- couponCode: couponCode,
|
|
|
186
|
- yohoCoin: yohoCoin,
|
|
|
187
|
- skuList: skuList
|
|
|
188
|
- }).then(result => {
|
183
|
+ cartModel.orderCompute(_.assign(params, {
|
|
|
184
|
+ product_sku_list: skuList
|
|
|
185
|
+ })).then(result => {
|
189
|
res.json(result);
|
186
|
res.json(result);
|
190
|
}).catch(next);
|
187
|
}).catch(next);
|
191
|
}
|
188
|
}
|