$(document).ready(function () { let url = window.location.search; 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; let labelcurrenttype = theRequest.labelcurrenttype || "coins"; if (theRequest.labelcurrenttype == "coins") { $(".SLHeaderChild").removeClass("SLHeaderChildActive"); $(".SLHeaderChild").eq(0).addClass("SLHeaderChildActive"); } else if (theRequest.labelcurrenttype == "vip") { $(".SLHeaderChild").removeClass("SLHeaderChildActive"); $(".SLHeaderChild").eq(1).addClass("SLHeaderChildActive"); } else if (theRequest.labelcurrenttype == "free") { $(".SLHeaderChild").removeClass("SLHeaderChildActive"); $(".SLHeaderChild").eq(2).addClass("SLHeaderChildActive"); } else if (theRequest.labelcurrenttype == "all") { $(".SLHeaderChild").removeClass("SLHeaderChildActive"); $(".SLHeaderChild").eq(3).addClass("SLHeaderChildActive"); } // 切换视频列表广告与片头广告 $(".SLHeaderChild").on("click", function () { // window.scrollTo(0, 0); var _this = $(this); $(".SLHeaderChild").removeClass("SLHeaderChildActive"); $(this).addClass("SLHeaderChildActive"); if (_this.attr("tabText") != theRequest.labelcurrenttype) { window.location.href = "source?labelcurrenttype=" + _this.attr("tabText"); } }); // 接口调用-获取数据-新增活跃 function getData() { $.ajax({ type: "post", url: "https://api.9169kkxstzsjkdd222.app/Admin/Adminbackoneeight/video_add_tongJi", dataType: "json", data: { //async: false, token: "b8e3bb6ef8747d7", type: labelcurrenttype }, success: function (res) { console.log(res); data = res.data; let AppleListHTML = ""; $.each(data, function (index, value) { AppleListHTML += `

${value.uploader}

${value.seven}

${value.count_video}

`; }); $("#AppleList").html(AppleListHTML); }, complete: function (res, status) { console.log(res); $("#page").paging({ pageNo: tabId, totalPage: 0, callback: function (num) { window.location.href = "https://api.9169kkxstzsjkdd222.app/source?TabId=" + num + "&labelcurrenttype" + labelcurrenttype; }, }); $(".HoutaiContainerBottomAppleListHeaderCZhf").on("click", function () { id = $(this).attr("id"); let content = $(this).attr("content"); $(".HoutaiContainerDialogAdd").show(); $("#feedbackContent").val(content); }); }, }); } getData(); });