'+'
'+data.resultData[i].userName+'
'+''+''+data.resultData[i].content+'
'+''+'';}$(commentHtml).appendTo($tabPageBody2);}else{alert(data.resultData+'!');}},error:function(xhr,type,error){alert(error);}});event.preventDefault();event.stopPropagation();}$tabPageBody2.css('top',0);$footFreeLoadMore.css('bottom',-150);moveFlag=false;$tabPageBody2.off('touchmove',onTouchMove);$tabPageBody2.off('touchend',onTouchEnd);}};$tabPageBody2.on('touchstart',onTouchStart);$('#commentContent').limitCharCount(250);});function doThumbup(commentId,eleObj){$.ajax({type:'POST',url:'/misc/commentThumbup',data:{commentId:commentId},dataType:'json',success:function(data){if(data.resultCode!=0){alert(data.resultData+'!');}else{var $eleObj=$(eleObj);var $thumbupCount=$('span',$eleObj);$thumbupCount.html(parseInt($thumbupCount.html())+1);$('i',$eleObj).addClass('textWarning');}},error:function(xhr,type,error){alert(error);}});}function showCommentDialog(){var closeDialog=showDialog('addCommentDialog',function(){var $commentContent=$('#commentContent');var commentContent=$commentContent.val().trim();if(commentContent.length<10){alert('评价内容不可少于10个字!');return false;}$.ajax({type:'POST',url:'/servant/addComment',data:{servantId:451,commentContent:commentContent,starLevel:$('#starLevel').val()},dataType:'json',success:function(data){if(data.resultCode==9){alert(data.resultData+'!',function(){location.href='/security/login';});}else if(data.resultCode==0){alert(data.resultData+'!',function(){$commentContent.val('');$('#addCommentDialog i.starYellow').removeClass('starYellow');closeDialog();});}else{alert(data.resultData+'!');}},error:function(xhr,type,error){alert(error);}});return false;},function(){$('#commentContent').val('');$('#addCommentDialog i.starYellow').removeClass('starYellow');});}function selectStarLevel(level,eleObj){var $starLevel=$('#starLevel'+level);var i;if($starLevel.hasClass('starYellow')){for(i=level;i<=5;i++){$('#starLevel'+i).removeClass('starYellow');}$('#starLevel').val(level-1);}else{for(i=1;i<=level;i++){$('#starLevel'+i).addClass('starYellow');}$('#starLevel').val(level);}}