Authored by 王水玲

星潮教室 收藏修改

@@ -23,7 +23,7 @@ const headTab = [ @@ -23,7 +23,7 @@ const headTab = [
23 name: '星专题' 23 name: '星专题'
24 }, 24 },
25 { 25 {
26 - url: '/guang/star/collocation', 26 + url: '/guang/star/collocation?uid=',
27 name: '星搭配' 27 name: '星搭配'
28 } 28 }
29 ]; 29 ];
@@ -58,6 +58,7 @@ exports.index = (req, res) => { @@ -58,6 +58,7 @@ exports.index = (req, res) => {
58 const pageHeadTab = _.cloneDeep(headTab); 58 const pageHeadTab = _.cloneDeep(headTab);
59 59
60 pageHeadTab[0].cur = true; 60 pageHeadTab[0].cur = true;
  61 + pageHeadTab[2].url += (req.query.uid || 0);
61 res.render('star/index', _.assign({ 62 res.render('star/index', _.assign({
62 page: 'star', 63 page: 'star',
63 isStarIndexPage: true, 64 isStarIndexPage: true,
@@ -90,6 +91,7 @@ exports.special = (req, res, next) => { @@ -90,6 +91,7 @@ exports.special = (req, res, next) => {
90 const pageHeadTab = _.cloneDeep(headTab); 91 const pageHeadTab = _.cloneDeep(headTab);
91 92
92 pageHeadTab[1].cur = true; 93 pageHeadTab[1].cur = true;
  94 + pageHeadTab[2].url += (req.query.uid || 0);
93 res.render('star/special', _.assign({ 95 res.render('star/special', _.assign({
94 page: 'special' 96 page: 'special'
95 }, processPublicData(req, '星潮教室'), { 97 }, processPublicData(req, '星潮教室'), {
@@ -111,6 +113,7 @@ exports.collocation = (req, res) => { @@ -111,6 +113,7 @@ exports.collocation = (req, res) => {
111 const pageHeadTab = _.cloneDeep(headTab); 113 const pageHeadTab = _.cloneDeep(headTab);
112 114
113 pageHeadTab[2].cur = true; 115 pageHeadTab[2].cur = true;
  116 + pageHeadTab[2].url += (req.query.uid || 0);
114 res.render('star/collocation', _.assign({ 117 res.render('star/collocation', _.assign({
115 isStarDetailPage: true, 118 isStarDetailPage: true,
116 page: 'collocation' 119 page: 'collocation'
@@ -128,7 +131,7 @@ exports.collocation = (req, res) => { @@ -128,7 +131,7 @@ exports.collocation = (req, res) => {
128 */ 131 */
129 exports.collocationList = (req, res, next) => { 132 exports.collocationList = (req, res, next) => {
130 let params = req.query; 133 let params = req.query;
131 - let uid = req.user.uid || 0; 134 + let uid = req.query.uid || 0; // 客户端访问,不能使用 cookie
132 135
133 starModel.getCollocationListData(params, uid).then((result) => { 136 starModel.getCollocationListData(params, uid).then((result) => {
134 res.render('star/list', _.assign({ 137 res.render('star/list', _.assign({