Authored by 张丽霞

uid判断

@@ -2,11 +2,10 @@ @@ -2,11 +2,10 @@
2 2
3 const mRoot = '../models'; 3 const mRoot = '../models';
4 const recommendForYouModel = require(`${mRoot}/recommend-for-you`); // 领取优惠券 model 4 const recommendForYouModel = require(`${mRoot}/recommend-for-you`); // 领取优惠券 model
5 -const _ = require('lodash');  
6 5
7 exports.userCenter = (req, res, next) => { 6 exports.userCenter = (req, res, next) => {
8 var udid = req.sessionID, 7 var udid = req.sessionID,
9 - uid = _.isEmpty(req.user.uid) ? null : req.user.uid, 8 + uid = req.user.uid || 0,
10 yhChannel = req.query.yh_channel || '1', 9 yhChannel = req.query.yh_channel || '1',
11 limit = 30; 10 limit = 30;
12 11
@@ -32,7 +31,7 @@ exports.userCenter = (req, res, next) => { @@ -32,7 +31,7 @@ exports.userCenter = (req, res, next) => {
32 31
33 exports.cart = (req, res, next) => { 32 exports.cart = (req, res, next) => {
34 var udid = req.sessionID, 33 var udid = req.sessionID,
35 - uid = _.isEmpty(req.user.uid) ? null : req.user.uid, 34 + uid = req.user.uid || 0,
36 yhChannel = req.query.yh_channel || '1', 35 yhChannel = req.query.yh_channel || '1',
37 limit = 30; 36 limit = 30;
38 37