...
|
...
|
@@ -7,7 +7,6 @@ |
|
|
'use strict';
|
|
|
|
|
|
const _ = require('lodash');
|
|
|
const cookie = global.yoho.cookie;
|
|
|
const camelCase = global.yoho.camelCase;
|
|
|
const config = global.yoho.config;
|
|
|
const mcHandler = require('../models/menu-crumb-handler');
|
...
|
...
|
@@ -18,7 +17,7 @@ const favorite = { |
|
|
goods(req, res, next) {
|
|
|
let q = req.query;
|
|
|
let page = parseInt(q.page || 1, 10);
|
|
|
let uid = cookie.getUid(req);
|
|
|
let uid = req.user.uid;
|
|
|
let sort = q.sort ? parseInt(q.sort, 10) : '';
|
|
|
let ret = {
|
|
|
module: 'me',
|
...
|
...
|
@@ -97,7 +96,7 @@ const favorite = { |
|
|
brand(req, res, next) {
|
|
|
let q = req.query;
|
|
|
let page = parseInt(q.page || 1, 10);
|
|
|
let uid = cookie.getUid(req);
|
|
|
let uid = req.user.uid;
|
|
|
let limit = 5;
|
|
|
let ret = {
|
|
|
module: 'me',
|
...
|
...
|
@@ -159,7 +158,7 @@ const favorite = { |
|
|
editorial(req, res, next) {
|
|
|
let q = req.query;
|
|
|
let page = parseInt(q.page || 1, 10);
|
|
|
let uid = cookie.getUid(req);
|
|
|
let uid = req.user.uid;
|
|
|
let limit = 5;
|
|
|
let ret = {
|
|
|
module: 'me',
|
...
|
...
|
@@ -209,7 +208,7 @@ const favorite = { |
|
|
cancel(req, res, next) {
|
|
|
let type = req.body.type;
|
|
|
let ids = req.body.ids;
|
|
|
let uid = cookie.getUid(req);
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
FavoriteData.cancelFavorite(uid, ids, type).then(result => {
|
|
|
if (result && result.code === 200) {
|
...
|
...
|
@@ -223,7 +222,7 @@ const favorite = { |
|
|
// 取消资讯收藏
|
|
|
editorialCancel(req, res, next) {
|
|
|
let ids = req.body.ids;
|
|
|
let uid = cookie.getUid(req);
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
FavoriteData.cancelEditorialFavorite(uid, ids).then(result => {
|
|
|
if (result && result.code === 200) {
|
...
|
...
|
|