favorite-api.js
538 Bytes
/**
* 收藏相关接口
* @author: yyq<yanqing.yang@yoho.cn>
* @date: 2016/7/17
*/
'use strict';
const api = global.yoho.API;
const addFavAsync = (uid, pid) => {
return api.get('', {
method: 'app.favorite.add',
id: pid,
uid: uid,
type: 'product'
});
};
const cancelFavAsync = (uid, pid) => {
return api.get('', {
method: 'app.favorite.cancel',
fav_id: pid,
uid: uid,
type: 'product'
});
};
module.exports = {
addFavAsync,
cancelFavAsync
};