...
|
...
|
@@ -70,18 +70,21 @@ const detail = (params, isApp) => { |
|
|
* @param {*} params
|
|
|
*/
|
|
|
const addToCart = (params) => {
|
|
|
if (!params.uid) {
|
|
|
return Promise.resolve({});
|
|
|
}
|
|
|
let skuList = params.product_sku_list;
|
|
|
|
|
|
return api.post('', {
|
|
|
let finalParams = {
|
|
|
method: 'app.Shopping.addBundle',
|
|
|
uid: params.uid,
|
|
|
shopping_key: params.shopping_key,
|
|
|
activity_id: params.activity_id,
|
|
|
product_sku_list: skuList
|
|
|
}, {
|
|
|
};
|
|
|
|
|
|
if (params.uid) {
|
|
|
Object.assign(finalParams, {
|
|
|
uid: params.uid
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return api.post('', finalParams, {
|
|
|
headers: {
|
|
|
'User-Agent': params.userAgent
|
|
|
}
|
...
|
...
|
|