input.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <LINK rel="Bookmark" href="/favicon.ico" >
  10. <LINK rel="Shortcut Icon" href="/favicon.ico" />
  11. <!-- 评论前台页面需要的js引入文件 -->
  12. <script type='text/javascript' src='${ctx}/assets/lib/jquery/1.9.1/jquery.min.js'></script>
  13. <script type='text/javascript' src='${ctx}/assets/lib/layer/3.0.3/layer.js'></script>
  14. <script type="text/javascript" src="${ctx}/assets/lib/jquery.form/jquery.form.min.js"></script>
  15. <script type="text/javascript" src="${ctx}/assets/lib/ueditor/1.4.3/ueditor.config.js"></script>
  16. <script type="text/javascript" src="${ctx}/assets/lib/ueditor/1.4.3/ueditor.all.js"> </script>
  17. <script type="text/javascript" src="${ctx}/assets/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
  18. <!-- 评论前台页面需要的CSS引入文件 -->
  19. <link rel='stylesheet' type='text/css' href='${ctx}/assets/lib/comment/css/style.css' />
  20. <!-- 评论前台页面需要的javascript方法定义 -->
  21. <script type='text/javascript'>
  22. //对文章进行评论
  23. function submitData(){
  24. $('#form-front').attr('action','${ctx}/myconsole/leavemessage/saveData');
  25. if($('#content').val()!=''&&$('#content').val()!='来说两句吧'){
  26. $('#form-front').ajaxSubmit(resultHandle);
  27. }
  28. else
  29. {
  30. layer.alert('请先输入留言内容!', {skin: 'layui-layer-molv',closeBtn: 1},
  31. function(){
  32. layer.closeAll('dialog');
  33. });
  34. }
  35. }
  36. //文章进行评论信息提交后的返回结果,成功则关闭对话框刷新评论列表
  37. function resultHandle(data){
  38. var res=eval('(' + data + ')');
  39. if(res.flag){
  40. layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 1},
  41. function(){
  42. $('#content').val('');
  43. layer.closeAll('dialog');
  44. $('#FirstPageContent').empty();
  45. getFirstPageContent();
  46. });
  47. }else{
  48. if(res.flag == false)
  49. {
  50. layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 0}, function(){});
  51. }
  52. }
  53. }
  54. //取最新留言内容
  55. function getFirstPageContent(){
  56. $('#page').val('1');
  57. $('#form-front').attr('action','${ctx}/myconsole/leavemessage/getByPageNew');
  58. $('#form-front').ajaxSubmit(setFirstData);
  59. }
  60. //对文章评论后最新评论内容显示
  61. function setFirstData(data){
  62. $('#FirstPageContent').prepend(data);
  63. }
  64. //调取更多评论数据
  65. function More(){
  66. var iPage=parseInt($('#page').val());
  67. iPage=iPage+1;
  68. $('#page').val(iPage);
  69. $('#form-front').attr('action','${ctx}/myconsole/leavemessage/getByPageNew');
  70. $('#form-front').ajaxSubmit(setData);
  71. }
  72. //把调取的更多评论数据显示到页面上
  73. function setData(data){
  74. if(data=='')
  75. {
  76. $('#MoreButton').text('没有更多留言数据了!');
  77. }
  78. else
  79. {
  80. $('#MoreData').prepend(data);
  81. }
  82. }
  83. //打开取消回复框
  84. function openCloseReply(oSourceObj,dataID){
  85. if($('#'+dataID).css('display')=='block')
  86. {
  87. $('#'+dataID).hide();
  88. oSourceObj.innerHTML = '查看回复';
  89. }
  90. else
  91. {
  92. $('#'+dataID).show();
  93. oSourceObj.innerHTML = '关闭回复';
  94. }
  95. }
  96. </script>
  97. <!--具体前台评论页面定义-->
  98. <title>信息编辑</title>
  99. <meta name="keywords" content="">
  100. <meta name="description" content="">
  101. </head>
  102. <body style="line-height:1;">
  103. <div style='width:772px;margin:0 auto'>
  104. <form id='form-front' method='post'>
  105. <div style='display: none'>
  106. <input type='hidden' id='userid' name='leaveMessage.userid' value='admin' />
  107. <input type='hidden' id='page' name='page' value='1' />
  108. <input type='hidden' id='pagesize' name='pagesize' value='10' />
  109. </div>
  110. <div class='comment_input_tit'>
  111. <dl>
  112. <dt>我要留言</dt>
  113. <dd><span>${UserAndInfoNum.UserNum!}</span>人留言,<span>${UserAndInfoNum.InfoNum!}</span>条留言</dd>
  114. </dl>
  115. </div>
  116. <div class='comment_input_pl_ly'>
  117. <div class='liuyankua'>
  118. <textarea id='content' name='leaveMessage.content' cols='' rows='5' style='color:#ccc' onfocus="this.value='',this.style.color='#636363'" >来说两句吧</textarea>
  119. <div class='comment_input_fabu_bg'>
  120. <div class='comment_input_fabu_left'>
  121. <div class='comment_input_fabu_name'><img src='${ctx}/assets/lib/comment/images/pic_tx_sm.png' width='26' height='26' /><span>共产党员网网友</span></div>
  122. <div class='comment_input_fabu_biaoq'></div>
  123. <div class='comment_input_fabu_fapic'></div>
  124. </div>
  125. <div class='comment_input_liuyanbtn'><a onclick='submitData()' href='javascript:;'>提&nbsp;&nbsp;交</a></div>
  126. </div>
  127. </div>
  128. </div>
  129. </form>
  130. </div>
  131. <div style='width:772px;margin:0 auto'>
  132. <div class='comment_list_tit'>
  133. <dl>
  134. <dt>最新留言</dt>
  135. <dd></dd>
  136. </dl>
  137. </div>
  138. <div class='jiazai' id=FirstPageContent>
  139. ${NewListData}
  140. </div>
  141. </div>
  142. <div style='width:772px;margin:0 auto'>
  143. <div class='jiazai' id=MoreData>
  144. <div class='more' ><a id=MoreButton onclick='More()' href='javascript:;'>点击查看更多留言</a></div>
  145. </div>
  146. </div>
  147. </body>
  148. </html>