i class="icon">您的反馈信息提交成功,谢谢您的反馈!'); } }) } function init_page() { layui.use('laypage', function(){ var laypage = layui.laypage; //执行一个laypage实例 laypage.render({ elem: 'page-content' //注意,这里的 test1 是 ID,不用加 # 号 ,count: '0' //数据总数,从服务端得到 ,theme:'#13df81' ,limit:'5' ,jump:function (obj,first) { comments_reload(obj.curr); } }); }); } function comments_reload(page) { layer.load(2); $.ajax({ type:'post', dataType:'json', url:'/help/ajax_get_comments', data:{page:page,aid:'826'}, success:function (list) { var html = '' $.each(list,function (index,obj) { html += '
  • \n' + ' \n' + '
    \n' + '
    \n' + ' '+obj.nickname+'\n' + ' 发表于'+obj.addtime+'\n' + // ' 14楼\n' + '
    \n' + '

    '+obj.content+'

    \n' if(obj.childlist) { html += '
    \n' $.each(obj.childlist,function (k,child) { html += '
    \n' + '
    \n' + ' '+child.nickname+'\n' + ' 发表于'+child.addtime+'\n' + '
    \n' + '

    '+child.content+'

    \n' + '
    \n' }); html += '
    ' } html += '

    回复

  • ' }); $('.comment-list').html(html); layer.closeAll(); } }) } function go_search() { var keyword = $('.search-text').val(); location.href = '/help/search?keywords='+keyword }