国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.6KB

  1. function FeedDel()
  2. {
  3. if(confirm("你确定删除该动态信息?"))
  4. return true;
  5. else
  6. return false;
  7. }
  8. $(function(){
  9. $('#arcticle').click(function() {
  10. $.ajax({
  11. type: "GET",
  12. url: "feed.php",
  13. dataType: "json",
  14. success : function(data){
  15. $('#FeedText').empty();
  16. var html = '<div class="newarticlelist"><ul>';
  17. $.each( data , function(commentIndex, comment) {
  18. html += '<li><span>' + comment['senddate'] + '</span><span><a href="/member/index.php?uid='+ comment['userid'] +'">'+ comment['userid'] +'</a></span><a href="' + comment['htmlurl'] + '" target="_blank">' + comment['title'] + '</a></li>';
  19. })
  20. html +="</ul></div>";
  21. $('#FeedText').html(html);
  22. $("#arcticle").addClass("thisTab");
  23. $("#myfeed").removeClass("thisTab");
  24. $("#allfeed").removeClass("thisTab");
  25. $("#score").removeClass("thisTab");
  26. $("#mood").removeClass("thisTab");
  27. }
  28. });
  29. });
  30. })
  31. $(function(){
  32. $('#allfeed').click(function() {
  33. $.ajax({
  34. type: "GET",
  35. url: "feed.php?type=allfeed",
  36. dataType: "json",
  37. success : function(data){
  38. $('#FeedText').empty();
  39. var html = '';
  40. $.each( data , function(commentIndex, comment) {
  41. html += '<div class="feeds_title ico' + comment['type'] + '"><span><a href="/member/index.php?uid='+ comment['uname'] +'">'+ comment['uname'] +'</a>' + comment['title'] + ' <em>' + comment['dtime'] + '</em></span><p>' + comment['note'] + '</p></div>';
  42. })
  43. $('#FeedText').html(html);
  44. $("#allfeed").addClass("thisTab");
  45. $("#myfeed").removeClass("thisTab");
  46. $("#arcticle").removeClass("thisTab");
  47. $("#score").removeClass("thisTab");
  48. $("#mood").removeClass("thisTab");
  49. }
  50. });
  51. });
  52. })
  53. //
  54. $(function(){
  55. $('#myfeed').click(function() {
  56. $.ajax({
  57. type: "GET",
  58. url: "feed.php?type=myfeed",
  59. dataType: "json",
  60. success : function(data){
  61. $('#FeedText').empty();
  62. var html = '';
  63. $.each( data , function(commentIndex, comment) {
  64. html += '<div class="feeds_title ico' + comment['type'] + '"><span><a href="index.php?uid='+ comment['uname'] +'&action=feeddel&fid=' + comment['fid'] + '" onclick="return FeedDel()" class="act">删除</a><a href="/member/index.php?uid='+ comment['uname'] +'">'+ comment['uname'] +'</a>' + comment['title'] + ' <em>' + comment['dtime'] + '</em></span><p>' + comment['note'] + '</p></div>';
  65. })
  66. $('#FeedText').html(html);
  67. $("#myfeed").addClass("thisTab");
  68. $("#allfeed").removeClass("thisTab");
  69. $("#arcticle").removeClass("thisTab");
  70. $("#score").removeClass("thisTab");
  71. $("#mood").removeClass("thisTab");
  72. }
  73. });
  74. });
  75. })
  76. //我的动态
  77. $(function(){
  78. $.ajax({
  79. type: "GET",
  80. url: "feed.php?type=myfeed",
  81. dataType: "json",
  82. success : function(data){
  83. $('#FeedText').empty();
  84. var html = '';
  85. $.each( data , function(commentIndex, comment) {
  86. html += '<div class="feeds_title ico' + comment['type'] + '"><span><a href="index.php?uid='+ comment['uname'] +'&action=feeddel&fid=' + comment['fid'] + '" onclick="return FeedDel()" class="act">删除</a><a href="/member/index.php?uid='+ comment['uname'] +'">'+ comment['uname'] +'</a>' + comment['title'] + ' <em>' + comment['dtime'] + '</em></span><p>' + comment['note'] + '</p></div>';
  87. })
  88. $('#FeedText').html(html);
  89. }
  90. });
  91. })