...
|
...
|
@@ -7,15 +7,21 @@ |
|
|
|
|
|
const api = global.yoho.API;
|
|
|
|
|
|
const getEasyPaymentAsync = (goods, uid) => {
|
|
|
return api.get('', {
|
|
|
const getEasyPaymentAsync = (uid, goods, activity) => {
|
|
|
let param = {
|
|
|
method: 'app.Shopping.easyPayment',
|
|
|
uid: uid,
|
|
|
cart_type: 'ordinary',
|
|
|
product_sku_list: goods,
|
|
|
yoho_coin_mode: 0,
|
|
|
is_support_apple_pay: 'N'
|
|
|
}, {code: 200});
|
|
|
};
|
|
|
|
|
|
if (activity) {
|
|
|
param.activity_id = activity;
|
|
|
}
|
|
|
|
|
|
return api.get('', param, {code: 200});
|
|
|
};
|
|
|
|
|
|
|
...
|
...
|
@@ -71,7 +77,14 @@ const getEasypayComputeAsync = (uid, cartType, paymentType, deliveryWay, other) |
|
|
Object.assign(param, {
|
|
|
product_sku_list: other.productSkuList
|
|
|
});
|
|
|
|
|
|
if (other.bundle) {
|
|
|
Object.assign(param, {
|
|
|
activity_id: other.bundle
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return api.get('', param);
|
...
|
...
|
@@ -151,6 +164,12 @@ const easypayOrderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliver |
|
|
Object.assign(param, {
|
|
|
product_sku_list: other.productSkuList
|
|
|
});
|
|
|
|
|
|
if (other.bundle) {
|
|
|
Object.assign(param, {
|
|
|
activity_id: other.bundle
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return api.get('', param);
|
...
|
...
|
|