|
@@ -19,9 +19,9 @@ $(function () {
|
|
|
$('.collectionN .heart').click(function () {
|
|
|
let heart = $('.heart');
|
|
|
if (heart.hasClass('active')) {
|
|
|
- collectionApi(0) //取消收藏
|
|
|
+ collectionApi(0) //取消关注
|
|
|
} else {
|
|
|
- collectionApi(1) //收藏
|
|
|
+ collectionApi(1) //关注
|
|
|
}
|
|
|
})
|
|
|
let hash = window.location.search,
|
|
@@ -29,7 +29,7 @@ $(function () {
|
|
|
ids =hashArr[1];
|
|
|
function collectionApi(index) {
|
|
|
let nub=parseInt($('.nubCollect').text());
|
|
|
- let url = index?'/api/user/portal/projectInterest':'/api/user/portal/projectCancelInterest'
|
|
|
+ let url = index?'/api/user/portal/expertInterest':'/api/user/portal/expertCancelInterest';
|
|
|
$.ajax({
|
|
|
method: "post",
|
|
|
dataType: "json",
|
|
@@ -45,14 +45,14 @@ $(function () {
|
|
|
$('.heart').removeClass('active');
|
|
|
$('.collectionN').removeClass('active');
|
|
|
$('.nubCollect').text((nub-1))
|
|
|
- $('#msg').val('撤销收藏')
|
|
|
+ $('#msg').val('取消关注')
|
|
|
}else{
|
|
|
$('.heart').addClass('active');
|
|
|
$('.collectionN').addClass('active');
|
|
|
$('.nubCollect').text((nub+1));
|
|
|
- $('#msg').val('收藏成功,请至个人中心查看.')
|
|
|
+ $('#msg').val('关注成功,请至个人中心-我的关注查看.');
|
|
|
}
|
|
|
- msg(index?'收藏成功,请至个人中心查看.':'撤销收藏');
|
|
|
+ msg(index?'关注成功,请至个人中心-我的关注查看.':'取消关注');
|
|
|
}
|
|
|
}
|
|
|
})
|