$(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/error_video_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.error_count} )`); let AppleListHTML = ""; $.each(data, function (index, value) { AppleListHTML += `

${value.time_date}

${value.now_url}

`; if (value.type == "0") { AppleListHTML += `

待解决

`; } else { 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/tabBtn11?TabId=" + num; }, }); $(".HoutaiContainerBottomAppleListHeaderNR").on("click", function () { let content = $(this).attr("content"); // 分享固定链接 let input = $( "" ); $("body").prepend(input); $("body").find("input").eq(0).select(); document.execCommand("copy"); $("body").find("input").eq(0).remove(); alert("复制成功~"); }) $(".HoutaiContainerBottomAppleListHeaderCZhf").on("click", function () { id = $(this).attr("id"); $.ajax({ type: "post", url: "https://api.9169kkxstzsjkdd222.app/Admin/Adminbackoneeight/save_error_video_type", dataType: "json", data: { v_id: id }, success: function (res) { // alert("添加成功"); console.log(res); window.location.reload(); }, }); }); }, }); } getData(); });