标签:点赞 this ntp vol UNC code log lse raise
//初始化点赞
var $praise_id = ‘<?php echo $praise; ?>‘;
$(function () {
if ($praise_id){
$(".bor:eq(0)").css({
border: "1px solid #06c1ae",
"border-radius": "5px",
"color": "#06c1ae"
}).html("已点赞");
}
});
$(".bor:eq(0)").click(function() {
var text = $(this).text();
if (text == ‘点赞‘){
$.post("{pigcms{:U(‘voluntPraise‘)}",{member_id:$("input[name=‘id‘]").val()},function (result) {
if (result.status == 300){
alert(result.message);
window.location.href = "{pigcms{:U(‘Login/index‘)}";
}else{
$(".bor:eq(0)").css({
border: "1px solid #06c1ae",
"border-radius": "5px",
"color": "#06c1ae"
}).html("已点赞");
}
},‘json‘)
}
});
标签:点赞 this ntp vol UNC code log lse raise
原文地址:https://www.cnblogs.com/wangyuyanhello/p/13266636.html