...
|
...
|
@@ -64,9 +64,13 @@ exports.cartPayAPI = (uid, cartType, isUseYohoCoin, skuList, activityInfo) => { |
|
|
* 2. 除非同时调用app.Shopping.payment 与该接口,用改接口的data值替换app.Shopping.payment相关值,
|
|
|
* 显示调用utils/payment-process.js@tranformPayment(他会帮你调yohoCoinCompute)处理payment的data;
|
|
|
*/
|
|
|
exports.orderComputeAPI = (uid, cartType, deliveWay, paymentType, couponCode, yohoCoin, skuList) => {
|
|
|
exports.orderComputeAPI = (uid, cartType, deliveWay, paymentType, couponCode, yohoCoin, skuList, activityInfo) => {
|
|
|
if (!activityInfo) {
|
|
|
activityInfo = null;
|
|
|
}
|
|
|
|
|
|
let param = {
|
|
|
method: 'app.Shopping.compute',
|
|
|
method: activityInfo ? 'app.Shopping.easyCompute' : 'app.Shopping.compute',
|
|
|
cart_type: cartType,
|
|
|
delive_way: deliveWay,
|
|
|
payment_type: paymentType
|
...
|
...
|
@@ -80,10 +84,16 @@ exports.orderComputeAPI = (uid, cartType, deliveWay, paymentType, couponCode, yo |
|
|
param.use_yoho_coin = yohoCoin;
|
|
|
}
|
|
|
|
|
|
if (!_.isEmpty(skuList)) {
|
|
|
if (!_.isEmpty(skuList) && !activityInfo) {
|
|
|
param.product_sku_list = skuList;
|
|
|
}
|
|
|
|
|
|
// 购买套餐商品需要的数据
|
|
|
if (activityInfo) {
|
|
|
param.activity_id = activityInfo.activity_id;
|
|
|
param.product_sku_list = activityInfo.product_sku_list;
|
|
|
}
|
|
|
|
|
|
return api.get('', param, {code: 200});
|
|
|
};
|
|
|
|
...
|
...
|
|