Authored by yyq

shop fav

... ... @@ -89,7 +89,7 @@ const collectProduct = (req, res, next) => {
const collectShop = (req, res, next) => {
let uid = req.user.uid || '';
let shopId = req.body.shopId;
let isadd = req.body.isFavorite;
let isadd = req.body.isFavorite * 1 ? true : false;
// needColloect 说明刚登录状态 是cookie传的值
if (req.body.needColloect * 1 === 1) {
... ... @@ -100,7 +100,7 @@ const collectShop = (req, res, next) => {
res.json({
code: 401,
message: '用户没有登录',
data: {url: helpers.urlFormat('/signin')}
data: {url: helpers.urlFormat('/signin.html')}
});
} else if (!shopId) {
res.json({
... ...