Showing
2 changed files
with
3 additions
and
2 deletions
@@ -148,7 +148,7 @@ exports.collocationList = (req, res, next) => { | @@ -148,7 +148,7 @@ exports.collocationList = (req, res, next) => { | ||
148 | */ | 148 | */ |
149 | exports.setFavorite = (req, res, next) => { | 149 | exports.setFavorite = (req, res, next) => { |
150 | let params = req.body; | 150 | let params = req.body; |
151 | - let uid = req.user.uid || 0; | 151 | + let uid = req.query.uid || 0; // 客户端访问,不能使用 cookie |
152 | let isApp = req.query.app_version || req.query.appVersion || false; | 152 | let isApp = req.query.app_version || req.query.appVersion || false; |
153 | let url = '/guang/star/collocation'; | 153 | let url = '/guang/star/collocation'; |
154 | let urlEncode = ''; | 154 | let urlEncode = ''; |
@@ -28,7 +28,8 @@ $(document).on('click', '.collection', function() { | @@ -28,7 +28,8 @@ $(document).on('click', '.collection', function() { | ||
28 | url: '/guang/star/setFavorite', | 28 | url: '/guang/star/setFavorite', |
29 | data: { | 29 | data: { |
30 | articleId: $that.parents('li').attr('articleId'), | 30 | articleId: $that.parents('li').attr('articleId'), |
31 | - type: type | 31 | + type: type, |
32 | + uid: window.queryString.uid | ||
32 | }, | 33 | }, |
33 | success: function(data) { | 34 | success: function(data) { |
34 | var code = data.code; | 35 | var code = data.code; |
-
Please register or login to post a comment