activity_reply.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>回复</title>
  7. <style>
  8. </style>
  9. </head>
  10. <body layout:fragment="content">
  11. <article class="page-container">
  12. <form class="form form-horizontal" id="form-activity-reply">
  13. <input id="feedback_id" th:value="${feedback.id}" hidden>
  14. <div class="row cl">
  15. <div style="padding: 20px 95px 20px 95px;">
  16. <span th:utext="${feedback.content}"></span>
  17. </div>
  18. </div>
  19. <div class="row cl">
  20. <div style="text-align: center;">
  21. <textarea style="width: 600px; height: 200px;"
  22. id="reply" name="reply" th:utext="${feedback.reply}"></textarea>
  23. </div>
  24. </div>
  25. <div class="row cl">
  26. <div style="text-align: center">
  27. <a onclick="replyMessage()" class="btn btn-primary radius">确定</a>
  28. <a onclick="removeIframe();" class="btn btn-default radius" type="button">返回</a>
  29. </div>
  30. </div>
  31. </form>
  32. </article>
  33. <script th:inline="javascript">
  34. function replyMessage() {
  35. $.ajax({
  36. type: 'put',
  37. url: pagePath + "/activity/comment/feedback",
  38. dataType: "json",
  39. data: {
  40. id: function () {
  41. return $("#feedback_id").val();
  42. },
  43. reply: function () {
  44. return $("#reply").val();
  45. }
  46. },
  47. success: function (data) {
  48. parent.$("#reply_"+$("#feedback_id").val()).html($("#reply").val());
  49. smileMessage('回复成功!')
  50. setTime();
  51. removeIframe()
  52. },
  53. error: function () {
  54. errorMessage('系统错误!');
  55. }
  56. });
  57. }
  58. /**
  59. * 取消
  60. */
  61. function removeIframe() {
  62. var index = parent.layer.getFrameIndex(window.name);
  63. parent.layer.close(index);
  64. }
  65. </script>
  66. </body>
  67. </html>