...
|
...
|
@@ -326,14 +326,18 @@ const checkFav = (req, res) => { |
|
|
co(function * () {
|
|
|
|
|
|
let uid = req.user.uid;
|
|
|
let pids = req.body.pidList.split(',');
|
|
|
let ret = {
|
|
|
code: 200,
|
|
|
code: 400,
|
|
|
message: '是否收藏',
|
|
|
data: {}
|
|
|
};
|
|
|
|
|
|
ret.data = yield service.checkUserIsFav(uid, pids);
|
|
|
if (uid && req.body.pidList) {
|
|
|
let pids = req.body.pidList.split(',');
|
|
|
|
|
|
Object.assign(ret, {code: 200,
|
|
|
data: yield service.checkUserIsFav(uid, pids)});
|
|
|
}
|
|
|
|
|
|
return res.send(ret);
|
|
|
})();
|
...
|
...
|
|