Authored by 郭成尧

delivery_way

... ... @@ -79,7 +79,10 @@ class cartModel extends global.yoho.BaseModel {
return Promise.all([
cartPayAPI, // 0. 订单数据
orderComputeAPI,
this.ctx.req.ctx(shoppingModel).getValidCouponCount(params.uid), // 2. 有效优惠券
this.ctx.req.ctx(shoppingModel).getValidCouponCount({
uid: params.uid,
delivery_way: orderInfoCookie.deliveryId
}), // 2. 有效优惠券
this.ctx.req.ctx(shoppingModel).countUsableGiftCard(params.uid) // 3 可用礼品卡数量
]).then(res => {
let pay = res[0];
... ...
... ... @@ -234,10 +234,11 @@ class shoppingModel extends global.yoho.BaseModel {
* @param uid int 用户uid
* @return see doc
*/
getValidCouponCount(uid) {
getValidCouponCount(params) {
let param = {
method: 'app.Shopping.countUsableCoupon',
uid
uid: params.uid,
delivery_way: params.delivery_way
};
return this.get({data: param});
... ...