function loadBaseComment(n,t){var i=layer.load();$.post("/Moments/List/GetCommentList",{cid:n,page:t,size:"5",module:"0"},function(r){if(r.code==1){var u=$("#temp_comment_base").render(r);$("#show_comment_base_"+n).html(u);$("#page_base_"+n).html(getBasePageBar(t,5,r.data[0].Total,n))}else r.code==3||BelltripTools.MsgBox.Fail(r.msg);layer.close(i)})}function loadMidComment(n,t,i,r){var u=layer.load();$.post("/Moments/List/GetCommentList",{cid:n,page:t,size:"3",module:"1"},function(f){var e,o;if(f.code==1){for(e="",o=0;o',e+='
',e+='
<\/a><\/div>',e+='
'+f.data[o].NickName+"<\/a><\/b><\/div>",f.data[o].ToUserID>0&&f.data[o].ToUserID!=r&&(e+='
回复<\/div>',e+='
'+f.data[o].ToNickName+"<\/a><\/b><\/div>"),e+=" <\/div>",e+='
',e+='
'+f.data[o].Content+"<\/div>",e+=" <\/div>",e+='
',f.data[o].UserID==$("#fsdfs").val()?(e+='
',e+='删除<\/a>',e+="<\/div>"):e+='
回复<\/a><\/div>',e+='
'+f.data[o].Date+"<\/span><\/div>",e+=" <\/div>",e+=" <\/div>",e+='
',f.data[o].ReplyTotal>0&&(e+=' 还有剩余'+f.data[o].ReplyTotal+"条回复,点击查看<\/a>"),e+='
我也说一句<\/a><\/div>',e+=" <\/div>";i==0?$("#show_comment_mid_"+n).find(".midContent").html(e):$("#show_comment_mid_"+n).find(".midContent").append(e);$("#show_comment_mid_"+n).find(".midContent").show();$("#show_comment_mid_"+n).find(".lys-reply-subd-concent-more").hide();$("#show_comment_mid_"+n).find(".lys-reply-subd-concent-more:last").show();$("#btnFindZiComment_"+n).attr("data-page",t)}else f.code==3||BelltripTools.MsgBox.Fail(f.msg);layer.close(u)})}function getBasePageBar(n,t,i,r){var f,e,o,u;if(i=Math.ceil(i/t),i<=1)return"";for(f=n-5,f<1&&(f=1),e=f+9,e>i&&(e=i,f=e-9<1?1:e-9),o="",o+='
首页<\/a><\/div>',o+='
上一页<\/a><\/div>',u=f;u<=e;u++)o+=u==n?'
'+u+"<\/div>":'
'+u+"<\/a><\/div>";return o+='
i?i:n+1)+')">下一页<\/a><\/div>',o+('
尾页<\/a><\/div>')}function loadBiaoQing(n){var i,r,t;if(biaoqingArr=="")BelltripApi.GetFaceImgs().done(function(t){var r,u,i;for(biaoqingArr=t,r="",u=0,i=0;i"),u++,u<10&&(r+="
"+t[i].text+"<\/td>"),(u==10||i==t.length-1)&&(r+="<\/tr>",u=0);r+="<\/tbody><\/table>";$(".lys-biaoqing-tablebox").html(r)});else{for(i="",r=0,t=0;t"),r++,r<10&&(i+="
"+biaoqingArr[t].text+"<\/td>"),(r==10||t==biaoqingArr.length-1)&&(i+="<\/tr>",r=0);i+="<\/tbody><\/table>";$(".lys-biaoqing-tablebox").html(i)}}function isLogin(){return $.trip.user.checkLogin()}(function(n,t){t(function(){t(".page").buildPage()});var i=function(i,r,u,f){function y(n,t){var r,i;if(t=t.toString().replace(/ /g,"").replace(/-/g,""),r=/youji\/list-(\S*)-(\d+).html/,i="/youji/list--1.html",location.href.match(r)){if(location.href.split("-")){var u=location.href.split("-"),f=u[1],e=u[2];switch(n){case 1:i="/youji/list-"+t+"-"+e+".html";break;case 2:i="/youji/list-"+f+"-"+t+".html"}}}else switch(n){case 1:i="/youji/list-"+t+"-1.html";break;case 2:i="/youji/list--"+t+".html"}return i}var s="",h=+t.trip.url("?"+f)||1,e,c,l,o,a,v;if(i>0&&i<=u)if(/^\/youji\/$/.test(location.pathname)||/youji\/list-(\S*)-(\d+).html/.test(location.pathname))h=location.href.match(/youji\/list-(\S*)-(\d+).html/)?location.href.match(/youji\/list-(\S*)-(\d+).html/)[2]:1,s=' href="'+y(2,i)+'" ';else if(/volunteer\/list-(\d+).html/.test(location.pathname))h=location.href.match(/volunteer\/list-(\d+).html/)?location.href.match(/volunteer\/list-(\d+).html/)[1]:1,s=' href="/volunteer/list-'+i+'.html"';else{e=t.trip.url("?");e[f]=i;c="?";l=0;for(o in e)c+=l==0?o+"="+e[o]:"&"+o+"="+e[o],l++;s=' href="'+n.location.pathname+c+'" '}return a=h==r?' class="currentpage" ':"",v=i>0&&i<=u?' data-p="'+i+'" ':"",""+r+"<\/a>"},r=function(n,r){var h=t(this),e=h.data("pageparam")||"page",r=r||+h.data("size")||10,n=n||+h.data("total"),f=+t.trip.url("?"+e)||1,l,a,u,s,v,y,c,o;if(/^\/youji\/$/.test(location.pathname)||/youji\/list-(\S*)-(\d+).html/.test(location.pathname)?f=location.href.match(/youji\/list-(\S*)-(\d+).html/)?location.href.match(/youji\/list-(\S*)-(\d+).html/)[2]:1:/volunteer\/list-(\d+).html/.test(location.pathname)&&(f=location.href.match(/volunteer\/list-(\d+).html/)?location.href.match(/volunteer\/list-(\d+).html/)[1]:1),!n){h.html("");return}if(l=[],a=Math.ceil(n/r),a>1){for(u=new StringBuffer,s=8,pagecount=n%r!=0?parseInt(n/r)+1:parseInt(n/r),f<1&&(f=1),pagecount<1&&(pagecount=1),f>pagecount&&(f=pagecount),v=parseInt(f)-1,y=parseInt(f)+1,v<1?(u.append(' 首页<\/a>'),u.append(' 上一页<\/a>')):(u.append(i(1,"首页",n,e)),u.append(i(v,"上一页",n,e))),c=f%s==0?f-(s-1):f-parseInt(f%s)+1,c>s&&u.append(i(c-1,"...",n,e)),o=c;opagecount)break;o==f?u.append(i(o,o,n,e)):u.append(i(o,o,n,e))}pagecount>=f+s&&u.append(i(c+s,"...",n,e));y>pagecount?(u.append(' 下一页<\/a>'),u.append(' 尾页<\/a>')):(u.append(i(y,"下一页",n,e)),u.append(i(pagecount,"尾页",n,e)));u.append(' 共'+a+"页<\/a>");l=u.toString()}return h.html(l),h};t.fn.extend({buildPage:r})})(window,$),function(n,t){var f=function(){n(document).on("click",".belltripalbum-media-show li.belltripalbum-media-item",function(){var t=n(this);t.hasClass("active")?t.removeClass("active"):t.addClass("active")});n(document).on("click",".belltripalbum-topic-btnsure",function(){var t=n("#belltripalbum-topic-name").val(),i=n("#belltripalbum-topic-remark").val();BelltripApi.Media.TopicSave(t,i).done(function(t){t.code==1?BelltripApi.Media.GetTopics().done(function(t){t.code==1&&n("#belltripalbum-select-topic").html(r(t.data));n(".belltripalbum-topic-name").hide()}):BelltripTools.MsgBox.Tips(t.msg)})});n(document).on("click","#belltripalbum-topic-chkall",function(){var t=n(this).prop("checked");t?n(".belltripalbum-media-show li").addClass("active"):n(".belltripalbum-media-show li").removeClass("active")});n(document).off("click",".belltripalbum-media-show .del").on("click",".belltripalbum-media-show .del",function(t){t.stopPropagation();var i=n(this),r=i.data().id,u=n("#belltripalbum-select-topic").val();BelltripTools.MsgBox.Confirm("确定删除吗?",function(){BelltripApi.Media.DeleteMedia(r,u).done(function(n){n.code==1?i.parent("li").remove():BelltripTools.MsgBox.Tips(n.msg)})})});n(document).on("change","#belltripalbum-select-topic",function(){var t=n(this).val();BelltripApi.Media.GetMedias(t).done(function(n){n.code==1?s(n.data):BelltripTools.MsgBox.Tips(n.msg)})});n(document).off("change","#belltripalbum-uploadimage").on("change","#belltripalbum-uploadimage",function(){var t=n("#belltripalbum-select-topic").val();BelltripApi2.Media.Upload("belltripalbum-uploadimage",t,!1).done(function(t){if(t.code==1){var i=[];n.each(t.data,function(n,t){i.push({MediaID:t.meidiaId,MediaName:t.mediaName,Tn:t.thumbUrl})});o(i)}else BelltripTools.MsgBox.Tips(t.msg)})});n(document).off("click",".belltripalbum-topic-container").on("click",".belltripalbum-topic-container",function(){n(".belltripalbum-topic-name").show()});n(document).off("click",".belltripalbum-topic-cancel").on("click",".belltripalbum-topic-cancel",function(){n(".belltripalbum-topic-name").hide()})},i=function(t){var i="";return t!=undefined&&t&&n.each(t,function(n,t){i+='
  • ';i+='';i+=""+t.MediaName+"<\/span>";i+='×<\/i>';i+="<\/li>"}),i},r=function(t){var i="";return t!=undefined&&t&&n.each(t,function(n,t){i+='
    ',u+='
    ',u+='',u+="上传图片<\/span>",u+="<\/div>",u+='