...
|
...
|
@@ -454,17 +454,13 @@ class BuyNowController { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 输入优惠券码使用优惠券
|
|
|
* 兑换优惠券
|
|
|
*/
|
|
|
useCouponCode(req, res, next) {
|
|
|
co(function* () {
|
|
|
let result = yield req.ctx(BuyNowModel).usePromotionCode({
|
|
|
uid: req.user.uid,
|
|
|
product_sku: req.body.product_sku,
|
|
|
sku_type: req.body.sku_type,
|
|
|
buy_number: req.body.buy_number,
|
|
|
promotion_code: req.body.promotion_code
|
|
|
});
|
|
|
let result = yield req.ctx(shoppingModel).useCoupon(
|
|
|
req.user.uid, req.body.couponCode
|
|
|
);
|
|
|
|
|
|
res.json(result);
|
|
|
})().catch(next);
|
...
|
...
|
|