...
|
...
|
@@ -32,13 +32,13 @@ $('#prise-btn').click(function() { |
|
|
}
|
|
|
|
|
|
if ($this.hasClass('liked')) {
|
|
|
|
|
|
url = '/editorial/info/cancelPraise';
|
|
|
// 点赞
|
|
|
url = '/editorial/info/praise';
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 取消点赞
|
|
|
url = '/editorial/info/cancelPraise';
|
|
|
url = '/editorial/info/praise';
|
|
|
}
|
|
|
prising = true;
|
|
|
$.ajax({
|
...
|
...
|
@@ -92,34 +92,6 @@ $('#collect-btn').click(function() { |
|
|
} else {
|
|
|
new _alert(data.message).show();
|
|
|
}
|
|
|
|
|
|
// switch (data.code) {
|
|
|
|
|
|
// // case 401:
|
|
|
|
|
|
// // // 防止从已有col的页面再次进行跳转后出错的情况
|
|
|
// // if (/\?col=(1|0)/.test(location.href)) {
|
|
|
// // hrefUrl = location.href.replace(/\?col=(1|0)/, '?col=' + col);
|
|
|
// // } else {
|
|
|
// // hrefUrl = location.href + '?col=' + col;
|
|
|
// // }
|
|
|
// // location.href = '//www.yohobuy.com/signin.html?refer=' + encodeURI(hrefUrl);
|
|
|
// // break;
|
|
|
// case 400:
|
|
|
// new _alert(data.message).show();
|
|
|
// break;
|
|
|
// case 200:
|
|
|
// if (/\?col=(1|0)/.test(location.href)) {
|
|
|
|
|
|
// // 如果页面url中含有col,为了防止页面刷新时收藏或者取消收藏会根据col来的问题,进行页面跳转拿掉参数
|
|
|
// location.href = location.href.replace(/\?col=(1|0)/, '');
|
|
|
// } else {
|
|
|
// $this.toggleClass('collected');
|
|
|
// }
|
|
|
// break;
|
|
|
// default:
|
|
|
// break;
|
|
|
// }
|
|
|
collecting = false;
|
|
|
});
|
|
|
}).bind('mouseenter mouseleave', function() {
|
...
|
...
|
|