123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- $(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/Adminbackonenine/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 += `
- <div id="${value.id}" class="HoutaiContainerBottomAppleListHeaders">
- <p class="HoutaiContainerBottomAppleListHeaderID">${value.user_name}</p>
- <p class="HoutaiContainerBottomAppleListHeaderZCSJ">${value.zhuce_time}</p>
- <p class="HoutaiContainerBottomAppleListHeaderJE">${value.all_pay}</p>
- <p class="HoutaiContainerBottomAppleListHeaderNR">${value.user_content}</p>
- <p imgurl="${value.fk_img}" class="HoutaiContainerBottomAppleListHeaderTP"><img src="${value.fk_img}" alt=""></p>
- <p class="HoutaiContainerBottomAppleListHeaderSJ">${value.user_date}</p>
- <div class="HoutaiContainerBottomAppleListHeaderCZ">`;
- if (value.type == "1") {
- AppleListHTML += `<p class="HoutaiContainerBottomAppleListHeaderCZhf " id="${value.id}" content = "${value.user_content}">回复</p>`;
- } else {
- AppleListHTML += `<p class="HoutaiContainerBottomAppleListHeaderCZyhf " id="${value.id}" content = "${value.user_content}" contentb = "${value.admin_content}">查看回复</p>`;
- }
- AppleListHTML += `</div>
- </div>`;
- });
- $("#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;
- },
- });
- $(".HoutaiContainerBottomAppleListHeaderTP").on("click", function () {
- $(".bannerImgBJ").show();
- let imgurl = $(this).attr("imgurl");
- $(".bannerImg").attr("src", imgurl);
- });
- $(".bannerImgBJ").on("click", function () {
- $(this).fadeOut(300);
- })
- $(".HoutaiContainerBottomAppleListHeaderCZhf").on("click", function () {
- id = $(this).attr("id");
- let content = $(this).attr("content");
- $(".HoutaiContainerDialogAdd").show();
- $("#feedbackContent").val(content);
- });
- $(".HoutaiContainerBottomAppleListHeaderCZyhf").on("click", function () {
- id = $(this).attr("id");
- let content = $(this).attr("content");
- let contentb = $(this).attr("contentb");
- $(".HoutaiContainerDialogLook").show();
- $("#feedbackContent2").val(content);
- $("#feedbackMessage2").val(contentb);
- });
- },
- });
- }
- 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();
- },
- });
- });
- $(".HoutaiContainerDialogLook").on("click", function () {
- $(".HoutaiContainerDialogLook").hide();
- });
- });
|