Showing
2 changed files
with
7 additions
and
3 deletions
@@ -79,7 +79,10 @@ class cartModel extends global.yoho.BaseModel { | @@ -79,7 +79,10 @@ class cartModel extends global.yoho.BaseModel { | ||
79 | return Promise.all([ | 79 | return Promise.all([ |
80 | cartPayAPI, // 0. 订单数据 | 80 | cartPayAPI, // 0. 订单数据 |
81 | orderComputeAPI, | 81 | orderComputeAPI, |
82 | - this.ctx.req.ctx(shoppingModel).getValidCouponCount(params.uid), // 2. 有效优惠券 | 82 | + this.ctx.req.ctx(shoppingModel).getValidCouponCount({ |
83 | + uid: params.uid, | ||
84 | + delivery_way: orderInfoCookie.deliveryId | ||
85 | + }), // 2. 有效优惠券 | ||
83 | this.ctx.req.ctx(shoppingModel).countUsableGiftCard(params.uid) // 3 可用礼品卡数量 | 86 | this.ctx.req.ctx(shoppingModel).countUsableGiftCard(params.uid) // 3 可用礼品卡数量 |
84 | ]).then(res => { | 87 | ]).then(res => { |
85 | let pay = res[0]; | 88 | let pay = res[0]; |
@@ -234,10 +234,11 @@ class shoppingModel extends global.yoho.BaseModel { | @@ -234,10 +234,11 @@ class shoppingModel extends global.yoho.BaseModel { | ||
234 | * @param uid int 用户uid | 234 | * @param uid int 用户uid |
235 | * @return see doc | 235 | * @return see doc |
236 | */ | 236 | */ |
237 | - getValidCouponCount(uid) { | 237 | + getValidCouponCount(params) { |
238 | let param = { | 238 | let param = { |
239 | method: 'app.Shopping.countUsableCoupon', | 239 | method: 'app.Shopping.countUsableCoupon', |
240 | - uid | 240 | + uid: params.uid, |
241 | + delivery_way: params.delivery_way | ||
241 | }; | 242 | }; |
242 | 243 | ||
243 | return this.get({data: param}); | 244 | return this.get({data: param}); |
-
Please register or login to post a comment