earningStatistics.js 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. $(document).ready(function () {
  2. let url = window.location.search;
  3. var theRequest = new Object();
  4. if (url.indexOf("?") != -1) {
  5. var str = url.substr(1);
  6. strs = str.split("&");
  7. for (var i = 0; i < strs.length; i++) {
  8. theRequest[strs[i].split("=")[0]] = unescape(
  9. decodeURI(strs[i].split("=")[1])
  10. );
  11. }
  12. }
  13. let tabId = theRequest.TabId || 1;
  14. // 数据-代理统计展示头
  15. $.ajax({
  16. type: "post",
  17. url: "https://www.aa9169.com/Admin/Adminback/agent_list_info_Above",
  18. dataType: "json",
  19. data: {},
  20. success: function (res) {
  21. console.log(res);
  22. let data = res.data;
  23. $("#tableCardDL").text(data.agent_people_amount);
  24. $("#tableCardMonthYQ").text(data.this_month_invite_num);
  25. $("#tableCardMonthHY").text(data.this_month_vip_num);
  26. $("#tableCardMonthYJ").text(data.this_month_agent_money);
  27. $("#tableCardAllYQ").text(data.accumulate_invite_num);
  28. $("#tableCardAllHY").text(data.accumulate_vip_num);
  29. $("#tableCardAllYJ").text(data.accumulate_agent_money);
  30. },
  31. });
  32. // 数据-代理统计列表
  33. $.ajax({
  34. type: "post",
  35. url: "https://www.aa9169.com/Admin/Adminback/agent_money_user_statistcs",
  36. dataType: "json",
  37. data: {
  38. // token: "b8e3bb6ef8747d7",
  39. page: tabId,
  40. // size: 5,
  41. },
  42. success: function (res) {
  43. console.log(res);
  44. var AppleList = "";
  45. $.each(res.data, function (index, value) {
  46. AppleList += `<div class="HoutaiContainerBottomAppleListHeaders">
  47. <p class="HoutaiContainerBottomAppleListHeaderYH">${value.agent_user_name}</p>
  48. <div class="HoutaiContainerBottomAppleListHeaderRQContent">
  49. <p class="HoutaiContainerBottomAppleListHeaderRQ">${value.registration_data.substr(0, 10)}</p>
  50. <p class="HoutaiContainerBottomAppleListHeaderRQ">${value.registration_data.substr(10, 18)}</p>
  51. </div>
  52. <p class="HoutaiContainerBottomAppleListHeaderHY">${value.vip_yn}</p>
  53. <p class="HoutaiContainerBottomAppleListHeaderBYQ">${value.this_month_invite_num}</p>
  54. <p class="HoutaiContainerBottomAppleListHeaderBHY">${value.this_month_vip_num}</p>
  55. <p class="HoutaiContainerBottomAppleListHeaderBYJ">${value.this_month_agent_money}</p>
  56. <p class="HoutaiContainerBottomAppleListHeaderLYQ">${value.accumulate_invite_num}</p>
  57. <p class="HoutaiContainerBottomAppleListHeaderLHQ">${value.accumulate_vip_num}</p>
  58. <p class="HoutaiContainerBottomAppleListHeaderLQJ">${value.accumulate_agent_money}</p>
  59. </div>`;
  60. });
  61. $("#AppleList").html(AppleList);
  62. },
  63. complete: function (res, status) {
  64. console.log(res.responseJSON.amount);
  65. $("#page").paging({
  66. pageNo: tabId,
  67. totalPage: parseInt(res.responseJSON.amount) / 50,
  68. callback: function (num) {
  69. window.location.href =
  70. "https://www.aa9169.com/earningstatistics?id=2&TabId=" + num;
  71. },
  72. });
  73. },
  74. });
  75. });