12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- $(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 += `
- <div class="HoutaiContainerBottomAppleListHeaders">
- <p class="HoutaiContainerBottomAppleListHeader1">${value.uploader}</p>
- <p class="HoutaiContainerBottomAppleListHeader2">${value.seven}</p>
- <p class="HoutaiContainerBottomAppleListHeader3">${value.count_video}</p>
- </div> `;
- });
- $("#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();
- });
|