ings('em'); show.html(parseInt(show.html())-1); } }); } // 添加喜欢 else { PERSON.like(dataid,0,function(status){ if(status === 2){ $(object).addClass('liked'); var show = $(object).siblings('em'); show.html(parseInt(show.html())+1); NOTE.likeTrue(object); } }); } }); //点击收藏 $("#js_box_goods .collectbtn").bind("click", function(){ if(uid === ""){ INIT.login(NOTE.refresh); return false; } var object = this; var dataid = $(this).attr('dataid'); var length = $(this).parent().find('.collected').length; // 取消收藏 if(length>0) { PERSON.uncollect(dataid,0,function(status){ if(status === 2){ $(object).removeClass('collected'); var show = $(object).siblings('em'); show.html(parseInt(show.html())-1); } }); } // 添加收藏 else { PERSON.collect(dataid,0,function(status){ if(status === 2){ $(object).addClass('collected'); var show = $(object).siblings('em'); show.html(parseInt(show.html())+1); NOTE.collectTrue(object); } }); } }); // 查看批发价 $("#js_box_goods .pfbtn").bind("click", function() { //INIT.login(NOTE.update); INIT.login(NOTE.refresh); }); });