$(document).ready(function () { let url = window.location.search; let id; let data; var theRequest = new Object(); if (url.indexOf("?") != -1) { var str = url.substr(1); strs = str.split("&"); for (var i = 0; i < strs.length; i++) { theRequest[strs[i].split("=")[0]] = unescape( decodeURI(strs[i].split("=")[1]) ); } } let tabId = theRequest.TabId || 1; // 接口调用-数据获取-反差列表 function getData() { $.ajax({ type: "post", url: "https://api.9169kkxstzsjkdd222.app/Admin/Adminbackoneeight/fankui_list_show", dataType: "json", data: { //async: false, token: "b8e3bb6ef8747d7", page: tabId, size: 50, }, success: function (res) { console.log(res); data = res.data; $(".SLHeader p").text(`意见反馈( ${res.all_count} )`); let AppleListHTML = ""; $.each(data, function (index, value) { AppleListHTML += `

${value.user_content}

${123123}

${123123}

${123123}

${123123}

${123123}

${123123}

${123123}

${123123}

`; AppleListHTML += `

清空数据

`; AppleListHTML += `
`; }); $("#AppleList").html(AppleListHTML); }, complete: function (res, status) { console.log(res); $("#page").paging({ pageNo: tabId, totalPage: Math.ceil(res.responseJSON.all_count / 50), callback: function (num) { window.location.href = "https://api.9169kkxstzsjkdd222.app/feedback?TabId=" + num; }, }); $(".HoutaiContainerBottomAppleListHeaderCZhf").on("click", function () { id = $(this).attr("id"); let content = $(this).attr("content"); $(".HoutaiContainerDialogAdd").show(); $("#feedbackContent").val(content); }); }, }); } getData(); // 功能-新增-反差内容-弹窗隐藏 $(".HoutaiContainerDialogLine5LeftAdd").on("click", function () { $(".HoutaiContainerDialogAdd").hide(); }); // 功能-新增-反差内容-确认新增 $(".HoutaiContainerDialogLine5RightAdd").on("click", function () { var formFile = new FormData(); formFile.append("id", id); formFile.append( "admin_content", $("#feedbackMessage").val() ); formFile.append("token", "b8e3bb6ef8747d7"); $.ajax({ type: "post", url: "https://api.9169kkxstzsjkdd222.app/Admin/Adminbackoneeight/huifu_user_fankui", dataType: "json", data: formFile, async: true, cache: false, contentType: false, processData: false, success: function (res) { // alert("添加成功"); console.log(res); window.location.reload(); }, }); }); });