tabBtn12.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. $(document).ready(function () {
  2. let url = window.location.search;
  3. let id;
  4. let data;
  5. var theRequest = new Object();
  6. if (url.indexOf("?") != -1) {
  7. var str = url.substr(1);
  8. strs = str.split("&");
  9. for (var i = 0; i < strs.length; i++) {
  10. theRequest[strs[i].split("=")[0]] = unescape(
  11. decodeURI(strs[i].split("=")[1])
  12. );
  13. }
  14. }
  15. let tabId = theRequest.TabId || 1;
  16. // 接口调用-数据获取-反差列表
  17. function getData() {
  18. $.ajax({
  19. type: "post",
  20. url: "https://api.9169kkxstzsjkdd222.app/Admin/Adminbackoneeight/fankui_list_show",
  21. dataType: "json",
  22. data: {
  23. //async: false,
  24. token: "b8e3bb6ef8747d7",
  25. page: tabId,
  26. size: 50,
  27. },
  28. success: function (res) {
  29. console.log(res);
  30. data = res.data;
  31. $(".SLHeader p").text(`意见反馈( ${res.all_count} )`);
  32. let AppleListHTML = "";
  33. $.each(data, function (index, value) {
  34. AppleListHTML += `
  35. <div id="${value.id}" class="HoutaiContainerBottomAppleListHeaders">
  36. <p class="HoutaiContainerBottomAppleListHeaderLineData1">${value.user_content}</p>
  37. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  38. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  39. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  40. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  41. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  42. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  43. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  44. <p class="HoutaiContainerBottomAppleListHeaderLineData2">${123123}</p>
  45. <div class="HoutaiContainerBottomAppleListHeaderCZ">`;
  46. AppleListHTML += `<p class="HoutaiContainerBottomAppleListHeaderCZhf " id="${value.id}" content = "${value.user_content}">清空数据</p>`;
  47. AppleListHTML += `</div>
  48. </div>`;
  49. });
  50. $("#AppleList").html(AppleListHTML);
  51. },
  52. complete: function (res, status) {
  53. console.log(res);
  54. $("#page").paging({
  55. pageNo: tabId,
  56. totalPage: Math.ceil(res.responseJSON.all_count / 50),
  57. callback: function (num) {
  58. window.location.href =
  59. "https://api.9169kkxstzsjkdd222.app/feedback?TabId=" + num;
  60. },
  61. });
  62. $(".HoutaiContainerBottomAppleListHeaderCZhf").on("click", function () {
  63. id = $(this).attr("id");
  64. let content = $(this).attr("content");
  65. $(".HoutaiContainerDialogAdd").show();
  66. $("#feedbackContent").val(content);
  67. });
  68. },
  69. });
  70. }
  71. getData();
  72. // 功能-新增-反差内容-弹窗隐藏
  73. $(".HoutaiContainerDialogLine5LeftAdd").on("click", function () {
  74. $(".HoutaiContainerDialogAdd").hide();
  75. });
  76. // 功能-新增-反差内容-确认新增
  77. $(".HoutaiContainerDialogLine5RightAdd").on("click", function () {
  78. var formFile = new FormData();
  79. formFile.append("id", id);
  80. formFile.append(
  81. "admin_content",
  82. $("#feedbackMessage").val()
  83. );
  84. formFile.append("token", "b8e3bb6ef8747d7");
  85. $.ajax({
  86. type: "post",
  87. url: "https://api.9169kkxstzsjkdd222.app/Admin/Adminbackoneeight/huifu_user_fankui",
  88. dataType: "json",
  89. data: formFile,
  90. async: true,
  91. cache: false,
  92. contentType: false,
  93. processData: false,
  94. success: function (res) {
  95. // alert("添加成功");
  96. console.log(res);
  97. window.location.reload();
  98. },
  99. });
  100. });
  101. });