Authored by 王水玲

星潮教室bug 修改

@@ -157,7 +157,7 @@ exports.setFavorite = (req, res, next) => { @@ -157,7 +157,7 @@ exports.setFavorite = (req, res, next) => {
157 let urlEncode = ''; 157 let urlEncode = '';
158 158
159 starModel.setFavorite(params, uid).then((result) => { 159 starModel.setFavorite(params, uid).then((result) => {
160 - if (result.code === 401) { 160 + if (result.code === 400) {
161 if (!isApp) { 161 if (!isApp) {
162 result.data = helpers.urlFormat('/signin.html', { 162 result.data = helpers.urlFormat('/signin.html', {
163 refer: req.get('Referer') || url 163 refer: req.get('Referer') || url
@@ -22,7 +22,6 @@ $(document).on('click', '.collection', function() { @@ -22,7 +22,6 @@ $(document).on('click', '.collection', function() {
22 type = 'fav'; 22 type = 'fav';
23 } 23 }
24 24
25 -  
26 $.ajax({ 25 $.ajax({
27 type: 'POST', 26 type: 'POST',
28 url: '/guang/star/setFavorite', 27 url: '/guang/star/setFavorite',
@@ -43,7 +42,7 @@ $(document).on('click', '.collection', function() { @@ -43,7 +42,7 @@ $(document).on('click', '.collection', function() {
43 42
44 } 43 }
45 44
46 - if (code === 401) { 45 + if (code === 400) {
47 if ($('#collocation-link').length <= 0) { 46 if ($('#collocation-link').length <= 0) {
48 $('body').append('<a href=\'' + data.data + '\' style="display:none;" id="collocation-link">' + 47 $('body').append('<a href=\'' + data.data + '\' style="display:none;" id="collocation-link">' +
49 '<span class="collocation-link"></span></a>'); 48 '<span class="collocation-link"></span></a>');