1
|
'use strict';
|
1
|
'use strict';
|
2
|
|
2
|
|
3
|
const mRoot = '../models';
|
3
|
const mRoot = '../models';
|
|
|
4
|
+const _ = require('lodash');
|
4
|
const recommendForYouModel = require(`${mRoot}/recommend-for-you`); // 领取优惠券 model
|
5
|
const recommendForYouModel = require(`${mRoot}/recommend-for-you`); // 领取优惠券 model
|
5
|
|
6
|
|
6
|
exports.userCenter = (req, res, next) => {
|
7
|
exports.userCenter = (req, res, next) => {
|
|
@@ -33,7 +34,7 @@ exports.cart = (req, res, next) => { |
|
@@ -33,7 +34,7 @@ exports.cart = (req, res, next) => { |
33
|
uid = req.user.uid || 0,
|
34
|
uid = req.user.uid || 0,
|
34
|
yhChannel = req.query.yh_channel || '1',
|
35
|
yhChannel = req.query.yh_channel || '1',
|
35
|
limit = 30;
|
36
|
limit = 30;
|
36
|
- if (req.app.locals.wap.cart.removePrefer) {
|
37
|
+ if (_.get(req, 'app.locals.wap.cart.removePrefer', false)) {
|
37
|
return res.send('');
|
38
|
return res.send('');
|
38
|
}
|
39
|
}
|
39
|
recommendForYouModel.getPreference({
|
40
|
recommendForYouModel.getPreference({
|