123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- $(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 += `
- <div id="${value.id}" class="HoutaiContainerBottomAppleListHeaders">
- <p class="HoutaiContainerBottomAppleListHeaderID">${value.time_date}</p>
- <p content="${value.now_url}" class="HoutaiContainerBottomAppleListHeaderNR">${value.now_url} <span><img src="Public/Admin/img/copy.png" alt=""></span></p>
- <div class="HoutaiContainerBottomAppleListHeaderCZ">`;
- if (value.type == "0") {
- AppleListHTML += `<p class="HoutaiContainerBottomAppleListHeaderCZhf " id="${value.v_id}">待解决</p>`;
- } else {
- AppleListHTML += `<p class="HoutaiContainerBottomAppleListHeaderCZyhf " id="${value.v_id}">已解决</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/tabBtn11?TabId=" + num;
- },
- });
- $(".HoutaiContainerBottomAppleListHeaderNR").on("click", function () {
- let content = $(this).attr("content");
- // 分享固定链接
- let input = $(
- "<input value = " + content + ">"
- );
- $("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();
- });
|