找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 751|回复: 0

H5日志打印运行过程例子

[复制链接]
发表于 2026-4-9 08:16:30 | 显示全部楼层 |阅读模式
H5日志打印运行过程例子



  1. <!DOCTYPE html>
  2. <!--
  3. &#127822;交流QQ群:711841924(群一 - 苹果内测群)
  4. &#127822;交流QQ群:528816639
  5. -->
  6. <html lang="zh-CN">
  7.   <head>
  8.     <meta charset="UTF-8">
  9.     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  10.     <meta name="apple-mobile-web-app-capable" content="yes">
  11.     <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  12.     <title>&#128176; 金币收割机 Pro - 自动化撸金币神器</title>
  13.     <style>
  14.       /* ============================================
  15.       * 金币收割机 Pro - 样式定义
  16.       * 功能: 自动化看广告撸金币系统
  17.       * ============================================
  18.       */

  19.       * { margin: 0; padding: 0; box-sizing: border-box; }

  20.       :root {
  21.         --gold: #FFD700;
  22.         --gold-dark: #FFA500;
  23.         --money-green: #00C851;
  24.         --vip-purple: #9C27B0;
  25.         --bg-dark: #1a1a2e;
  26.         --bg-card: #16213e;
  27.         --text-primary: #ffffff;
  28.         --text-secondary: #a0a0a0;
  29.       }

  30.       body {
  31.         font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  32.         background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  33.         color: var(--text-primary);
  34.         min-height: 100vh;
  35.         overflow-x: hidden;
  36.       }

  37.       /* 金币飘落动画背景 */
  38.       .coins-rain {
  39.         position: fixed;
  40.         top: 0;
  41.         left: 0;
  42.         width: 100%;
  43.         height: 100%;
  44.         pointer-events: none;
  45.         z-index: 0;
  46.         overflow: hidden;
  47.       }

  48.       .coin {
  49.         position: absolute;
  50.         font-size: 20px;
  51.         animation: coinFall linear infinite;
  52.         opacity: 0.3;
  53.       }

  54.       @keyframes coinFall {
  55.         0% { transform: translateY(-100px) rotate(0deg); opacity: 0; }
  56.         10% { opacity: 0.3; }
  57.         90% { opacity: 0.3; }
  58.         100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
  59.       }

  60.       /* QQ群信息标题栏 */
  61.       .qq-group-bar {
  62.         background: linear-gradient(90deg, #FF6B6B 0%, #FF8E53 50%, #FFD700 100%);
  63.         padding: 10px 16px;
  64.         text-align: center;
  65.         position: relative;
  66.         z-index: 20;
  67.         box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  68.       }

  69.       .qq-group-text {
  70.         font-size: 13px;
  71.         font-weight: 700;
  72.         color: #fff;
  73.         text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  74.         letter-spacing: 0.5px;
  75.       }

  76.       .app-container {
  77.         position: relative;
  78.         z-index: 10;
  79.         max-width: 480px;
  80.         margin: 0 auto;
  81.         padding: 16px;
  82.       }

  83.       /* 顶部金币统计 */
  84.       .gold-header {
  85.         background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  86.         border-radius: 20px;
  87.         padding: 24px;
  88.         text-align: center;
  89.         margin-bottom: 20px;
  90.         box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
  91.         position: relative;
  92.         overflow: hidden;
  93.         }

  94.         .gold-header::before {
  95.             content: '&#128176;';
  96.             position: absolute;
  97.             font-size: 120px;
  98.             opacity: 0.1;
  99.             right: -20px;
  100.             top: -20px;
  101.         }

  102.         .today-earnings {
  103.             font-size: 14px;
  104.             color: rgba(0,0,0,0.6);
  105.             margin-bottom: 8px;
  106.             font-weight: 600;
  107.         }

  108.         .gold-amount {
  109.             font-size: 48px;
  110.             font-weight: 900;
  111.             color: #000;
  112.             text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
  113.             display: flex;
  114.             align-items: center;
  115.             justify-content: center;
  116.             gap: 8px;
  117.         }

  118.         .gold-amount::before {
  119.             content: '&#128142;';
  120.             font-size: 32px;
  121.         }

  122.         .gold-convert {
  123.             font-size: 13px;
  124.             color: rgba(0,0,0,0.7);
  125.             margin-top: 8px;
  126.             background: rgba(255,255,255,0.3);
  127.             display: inline-block;
  128.             padding: 4px 12px;
  129.             border-radius: 20px;
  130.         }

  131.         /* 统计卡片 */
  132.         .stats-row {
  133.             display: grid;
  134.             grid-template-columns: repeat(3, 1fr);
  135.             gap: 12px;
  136.             margin-bottom: 20px;
  137.         }

  138.         .stat-box {
  139.             background: var(--bg-card);
  140.             border-radius: 16px;
  141.             padding: 16px 8px;
  142.             text-align: center;
  143.             border: 1px solid rgba(255,215,0,0.1);
  144.         }

  145.         .stat-icon {
  146.             font-size: 24px;
  147.             margin-bottom: 4px;
  148.         }

  149.         .stat-value {
  150.             font-size: 20px;
  151.             font-weight: 800;
  152.             color: var(--gold);
  153.         }

  154.         .stat-label {
  155.             font-size: 11px;
  156.             color: var(--text-secondary);
  157.             margin-top: 2px;
  158.         }

  159.         /* 平台列表 */
  160.         .platforms-section {
  161.             margin-bottom: 20px;
  162.         }

  163.         .section-title {
  164.             font-size: 16px;
  165.             font-weight: 700;
  166.             margin-bottom: 12px;
  167.             display: flex;
  168.             align-items: center;
  169.             gap: 8px;
  170.         }

  171.         .platform-card {
  172.             background: var(--bg-card);
  173.             border-radius: 16px;
  174.             padding: 16px;
  175.             margin-bottom: 12px;
  176.             border: 1px solid rgba(255,255,255,0.05);
  177.             display: flex;
  178.             align-items: center;
  179.             gap: 12px;
  180.             transition: all 0.3s ease;
  181.         }

  182.         .platform-card:hover {
  183.             border-color: rgba(255,215,0,0.3);
  184.             transform: translateX(4px);
  185.         }

  186.         .platform-icon {
  187.             width: 48px;
  188.             height: 48px;
  189.             border-radius: 12px;
  190.             display: flex;
  191.             align-items: center;
  192.             justify-content: center;
  193.             font-size: 28px;
  194.             flex-shrink: 0;
  195.         }

  196.         .platform-icon.douyin { background: linear-gradient(135deg, #000 0%, #333 100%); }
  197.         .platform-icon.kuaishou { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); }
  198.         .platform-icon.baidu { background: linear-gradient(135deg, #2932E1 0%, #4B5CFF 100%); }
  199.         .platform-icon.fanqie { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%); }

  200.         .platform-info {
  201.             flex: 1;
  202.         }

  203.         .platform-name {
  204.             font-size: 15px;
  205.             font-weight: 700;
  206.             margin-bottom: 4px;
  207.         }

  208.         .platform-status {
  209.             font-size: 12px;
  210.             color: var(--text-secondary);
  211.         }

  212.         .platform-status.ready { color: var(--money-green); }
  213.         .platform-status.running { color: var(--gold); }
  214.         .platform-status.cooldown { color: #FF6B6B; }

  215.         .platform-earnings {
  216.             text-align: right;
  217.         }

  218.         .earnings-amount {
  219.             font-size: 18px;
  220.             font-weight: 800;
  221.             color: var(--gold);
  222.         }

  223.         .earnings-label {
  224.             font-size: 10px;
  225.             color: var(--text-secondary);
  226.         }

  227.         /* 开关 */
  228.         .switch {
  229.             position: relative;
  230.             width: 50px;
  231.             height: 26px;
  232.             flex-shrink: 0;
  233.         }

  234.         .switch input {
  235.             opacity: 0;
  236.             width: 0;
  237.             height: 0;
  238.         }

  239.         .slider {
  240.             position: absolute;
  241.             cursor: pointer;
  242.             top: 0;
  243.             left: 0;
  244.             right: 0;
  245.             bottom: 0;
  246.             background-color: #333;
  247.             transition: .4s;
  248.             border-radius: 26px;
  249.         }

  250.         .slider:before {
  251.             position: absolute;
  252.             content: "";
  253.             height: 20px;
  254.             width: 20px;
  255.             left: 3px;
  256.             bottom: 3px;
  257.             background-color: white;
  258.             transition: .4s;
  259.             border-radius: 50%;
  260.         }

  261.         input:checked + .slider {
  262.             background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  263.         }

  264.         input:checked + .slider:before {
  265.             transform: translateX(24px);
  266.         }

  267.         /* 控制按钮 */
  268.         .control-panel {
  269.             background: var(--bg-card);
  270.             border-radius: 20px;
  271.             padding: 20px;
  272.             margin-bottom: 20px;
  273.         }

  274.         .main-btn {
  275.             width: 100%;
  276.             padding: 18px;
  277.             border: none;
  278.             border-radius: 16px;
  279.             font-size: 18px;
  280.             font-weight: 800;
  281.             cursor: pointer;
  282.             transition: all 0.3s ease;
  283.             display: flex;
  284.             align-items: center;
  285.             justify-content: center;
  286.             gap: 8px;
  287.             margin-bottom: 12px;
  288.         }

  289.         .btn-start {
  290.             background: linear-gradient(135deg, #00C851 0%, #00E676 100%);
  291.             color: white;
  292.             box-shadow: 0 8px 32px rgba(0, 200, 81, 0.4);
  293.         }

  294.         .btn-start:hover {
  295.             transform: translateY(-2px);
  296.             box-shadow: 0 12px 40px rgba(0, 200, 81, 0.5);
  297.         }

  298.         .btn-stop {
  299.             background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  300.             color: white;
  301.             box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4);
  302.             display: none;
  303.         }

  304.         .btn-stop.active {
  305.             display: flex;
  306.         }

  307.         .btn-start.hidden {
  308.             display: none;
  309.         }

  310.         /* 模式选择 */
  311.         .mode-selector {
  312.             display: grid;
  313.             grid-template-columns: repeat(3, 1fr);
  314.             gap: 8px;
  315.         }

  316.         .mode-btn {
  317.             padding: 12px 8px;
  318.             border: 2px solid rgba(255,255,255,0.1);
  319.             background: transparent;
  320.             border-radius: 12px;
  321.             color: var(--text-secondary);
  322.             font-size: 12px;
  323.             font-weight: 600;
  324.             cursor: pointer;
  325.             transition: all 0.3s ease;
  326.         }

  327.         .mode-btn.active {
  328.             border-color: var(--gold);
  329.             color: var(--gold);
  330.             background: rgba(255, 215, 0, 0.1);
  331.         }

  332.         /* 日志区域 - 放大版 */
  333.         .log-section {
  334.             background: var(--bg-card);
  335.             border-radius: 20px;
  336.             padding: 20px;
  337.             margin-top: 20px;
  338.             border: 2px solid rgba(255, 215, 0, 0.2);
  339.             box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  340.         }

  341.         .log-header {
  342.             display: flex;
  343.             justify-content: space-between;
  344.             align-items: center;
  345.             margin-bottom: 16px;
  346.             padding-bottom: 12px;
  347.             border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  348.         }

  349.         .log-title {
  350.             display: flex;
  351.             align-items: center;
  352.             gap: 10px;
  353.         }

  354.         .log-title-icon {
  355.             font-size: 20px;
  356.         }

  357.         .log-title-text {
  358.             font-size: 16px;
  359.             font-weight: 700;
  360.             color: var(--gold);
  361.         }

  362.         .log-stats {
  363.             display: flex;
  364.             gap: 12px;
  365.         }

  366.         .log-stat {
  367.             background: rgba(255, 215, 0, 0.1);
  368.             padding: 4px 12px;
  369.             border-radius: 12px;
  370.             font-size: 11px;
  371.             color: var(--gold);
  372.         }

  373.         .log-toolbar {
  374.             display: flex;
  375.             gap: 8px;
  376.             margin-bottom: 12px;
  377.             flex-wrap: wrap;
  378.         }

  379.         .log-btn {
  380.             background: rgba(255, 255, 255, 0.1);
  381.             border: 1px solid rgba(255, 255, 255, 0.2);
  382.             color: var(--text-secondary);
  383.             padding: 8px 16px;
  384.             border-radius: 8px;
  385.             font-size: 12px;
  386.             cursor: pointer;
  387.             transition: all 0.2s ease;
  388.             display: flex;
  389.             align-items: center;
  390.             gap: 6px;
  391.         }

  392.         .log-btn:hover {
  393.             background: rgba(255, 215, 0, 0.2);
  394.             border-color: var(--gold);
  395.             color: var(--gold);
  396.         }

  397.         .log-btn.active {
  398.             background: rgba(255, 215, 0, 0.3);
  399.             border-color: var(--gold);
  400.             color: var(--gold);
  401.         }

  402.         .log-filter-bar {
  403.             display: flex;
  404.             gap: 6px;
  405.             margin-bottom: 12px;
  406.             flex-wrap: wrap;
  407.         }

  408.         .filter-btn {
  409.             background: rgba(255, 255, 255, 0.05);
  410.             border: 1px solid rgba(255, 255, 255, 0.1);
  411.             color: var(--text-secondary);
  412.             padding: 6px 12px;
  413.             border-radius: 20px;
  414.             font-size: 11px;
  415.             cursor: pointer;
  416.             transition: all 0.2s ease;
  417.         }

  418.         .filter-btn:hover {
  419.             background: rgba(255, 255, 255, 0.1);
  420.         }

  421.         .filter-btn.active {
  422.             background: rgba(255, 215, 0, 0.2);
  423.             border-color: var(--gold);
  424.             color: var(--gold);
  425.         }

  426.         .log-container {
  427.             background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(15, 15, 35, 0.6) 100%);
  428.             border-radius: 16px;
  429.             padding: 16px;
  430.             max-height: 600px;
  431.             min-height: 400px;
  432.             overflow-y: auto;
  433.             font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  434.             font-size: 13px;
  435.             line-height: 1.8;
  436.             border: 1px solid rgba(255, 255, 255, 0.05);
  437.         }

  438.         .log-container::-webkit-scrollbar {
  439.             width: 8px;
  440.         }

  441.         .log-container::-webkit-scrollbar-track {
  442.             background: rgba(255, 255, 255, 0.05);
  443.             border-radius: 4px;
  444.         }

  445.         .log-container::-webkit-scrollbar-thumb {
  446.             background: rgba(255, 215, 0, 0.3);
  447.             border-radius: 4px;
  448.         }

  449.         .log-container::-webkit-scrollbar-thumb:hover {
  450.             background: rgba(255, 215, 0, 0.5);
  451.         }

  452.         .log-entry {
  453.             padding: 8px 12px;
  454.             margin-bottom: 4px;
  455.             border-radius: 8px;
  456.             background: rgba(255, 255, 255, 0.02);
  457.             border-left: 3px solid transparent;
  458.             display: flex;
  459.             gap: 10px;
  460.             align-items: flex-start;
  461.             animation: logFadeIn 0.3s ease;
  462.         }

  463.         @keyframes logFadeIn {
  464.             from { opacity: 0; transform: translateX(-10px); }
  465.             to { opacity: 1; transform: translateX(0); }
  466.         }

  467.         .log-entry:hover {
  468.             background: rgba(255, 255, 255, 0.05);
  469.         }

  470.         .log-entry.info { border-left-color: #3498db; }
  471.         .log-entry.success { border-left-color: #2ecc71; }
  472.         .log-entry.gold { border-left-color: #FFD700; }
  473.         .log-entry.error { border-left-color: #e74c3c; }
  474.         .log-entry.warn { border-left-color: #f39c12; }
  475.         .log-entry.debug { border-left-color: #9b59b6; }

  476.         .log-icon {
  477.             font-size: 14px;
  478.             flex-shrink: 0;
  479.             width: 20px;
  480.             text-align: center;
  481.         }

  482.         .log-time {
  483.             color: #666;
  484.             flex-shrink: 0;
  485.             font-size: 11px;
  486.             min-width: 70px;
  487.         }

  488.         .log-level {
  489.             font-size: 10px;
  490.             padding: 2px 6px;
  491.             border-radius: 4px;
  492.             font-weight: 600;
  493.             text-transform: uppercase;
  494.             flex-shrink: 0;
  495.         }

  496.         .log-level.info { background: rgba(52, 152, 219, 0.3); color: #3498db; }
  497.         .log-level.success { background: rgba(46, 204, 113, 0.3); color: #2ecc71; }
  498.         .log-level.gold { background: rgba(255, 215, 0, 0.3); color: #FFD700; }
  499.         .log-level.error { background: rgba(231, 76, 60, 0.3); color: #e74c3c; }
  500.         .log-level.warn { background: rgba(243, 156, 18, 0.3); color: #f39c12; }
  501.         .log-level.debug { background: rgba(155, 89, 182, 0.3); color: #9b59b6; }

  502.         .log-message {
  503.             color: #e0e0e0;
  504.             word-break: break-all;
  505.             flex: 1;
  506.         }

  507.         .log-success { color: #2ecc71; }
  508.         .log-gold { color: #FFD700; }
  509.         .log-error { color: #e74c3c; }
  510.         .log-warn { color: #f39c12; }
  511.         .log-info { color: #3498db; }

  512.         .log-empty {
  513.             text-align: center;
  514.             padding: 40px 20px;
  515.             color: #666;
  516.         }

  517.         .log-empty-icon {
  518.             font-size: 48px;
  519.             margin-bottom: 16px;
  520.             opacity: 0.5;
  521.         }

  522.         .log-empty-text {
  523.             font-size: 14px;
  524.         }

  525.         /* 动画 */
  526.         @keyframes pulse-gold {
  527.             0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
  528.             50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
  529.         }

  530.         .earning {
  531.             animation: pulse-gold 2s infinite;
  532.         }

  533.         /* Toast */
  534.         .toast {
  535.             position: fixed;
  536.             bottom: 100px;
  537.             left: 50%;
  538.             transform: translateX(-50%) translateY(100px);
  539.             background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  540.             color: #000;
  541.             padding: 16px 32px;
  542.             border-radius: 50px;
  543.             font-weight: 700;
  544.             opacity: 0;
  545.             transition: all 0.3s ease;
  546.             z-index: 9999;
  547.             box-shadow: 0 8px 32px rgba(255, 215, 0, 0.4);
  548.         }

  549.         .toast.show {
  550.             opacity: 1;
  551.             transform: translateX(-50%) translateY(0);
  552.         }

  553.         /* 进度条 */
  554.         .progress-bar {
  555.             height: 6px;
  556.             background: rgba(255,255,255,0.1);
  557.             border-radius: 3px;
  558.             overflow: hidden;
  559.             margin-top: 8px;
  560.         }

  561.         .progress-fill {
  562.             height: 100%;
  563.             background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
  564.             border-radius: 3px;
  565.             transition: width 0.5s ease;
  566.         }
  567.     </style>
  568. </head>
  569. <body>
  570.     <!-- 金币飘落背景 -->
  571.     <div class="coins-rain" id="coinsRain"></div>

  572.     <!-- QQ群信息标题栏 -->
  573.     <div class="qq-group-bar">
  574.         <span class="qq-group-text">&#127822;交流QQ群:711841924(群一-苹果内测群) 528816639</span>
  575.     </div>

  576.     <div class="app-container">
  577.         <!-- 顶部金币统计 -->
  578.         <div class="gold-header">
  579.             <div class="today-earnings">&#128142; 今日收益</div>
  580.             <div class="gold-amount" id="todayGold">0</div>
  581.             <div class="gold-convert">≈ &#165;<span id="rmbValue">0.00</span> 元</div>
  582.         </div>

  583.         <!-- 统计卡片 -->
  584.         <div class="stats-row">
  585.             <div class="stat-box">
  586.                 <div class="stat-icon">&#128250;</div>
  587.                 <div class="stat-value" id="adCount">0</div>
  588.                 <div class="stat-label">观看广告</div>
  589.             </div>
  590.             <div class="stat-box">
  591.                 <div class="stat-icon">&#9201;&#65039;</div>
  592.                 <div class="stat-value" id="runTime">0</div>
  593.                 <div class="stat-label">运行(分)</div>
  594.             </div>
  595.             <div class="stat-box">
  596.                 <div class="stat-icon">&#127919;</div>
  597.                 <div class="stat-value" id="successRate">0%</div>
  598.                 <div class="stat-label">成功率</div>
  599.             </div>
  600.         </div>

  601.         <!-- 平台列表 -->
  602.         <div class="platforms-section">
  603.             <div class="section-title">&#128241; 金币平台</div>
  604.             
  605.             <div class="platform-card">
  606.                 <div class="platform-icon douyin">&#127925;</div>
  607.                 <div class="platform-info">
  608.                     <div class="platform-name">抖音极速版</div>
  609.                     <div class="platform-status ready" id="status-douyin">&#9989; 准备就绪</div>
  610.                     <div class="progress-bar"><div class="progress-fill" id="progress-douyin" style="width: 0%"></div></div>
  611.                 </div>
  612.                 <div class="platform-earnings">
  613.                     <div class="earnings-amount" id="gold-douyin">0</div>
  614.                     <div class="earnings-label">金币</div>
  615.                 </div>
  616.                 <label class="switch">
  617.                     <input type="checkbox" id="enable-douyin" checked>
  618.                     <span class="slider"></span>
  619.                 </label>
  620.             </div>

  621.             <div class="platform-card">
  622.                 <div class="platform-icon kuaishou">&#9889;</div>
  623.                 <div class="platform-info">
  624.                     <div class="platform-name">快手极速版</div>
  625.                     <div class="platform-status ready" id="status-kuaishou">&#9989; 准备就绪</div>
  626.                     <div class="progress-bar"><div class="progress-fill" id="progress-kuaishou" style="width: 0%"></div></div>
  627.                 </div>
  628.                 <div class="platform-earnings">
  629.                     <div class="earnings-amount" id="gold-kuaishou">0</div>
  630.                     <div class="earnings-label">金币</div>
  631.                 </div>
  632.                 <label class="switch">
  633.                     <input type="checkbox" id="enable-kuaishou" checked>
  634.                     <span class="slider"></span>
  635.                 </label>
  636.             </div>

  637.             <div class="platform-card">
  638.                 <div class="platform-icon baidu">&#128269;</div>
  639.                 <div class="platform-info">
  640.                     <div class="platform-name">百度极速版</div>
  641.                     <div class="platform-status ready" id="status-baidu">&#9989; 准备就绪</div>
  642.                     <div class="progress-bar"><div class="progress-fill" id="progress-baidu" style="width: 0%"></div></div>
  643.                 </div>
  644.                 <div class="platform-earnings">
  645.                     <div class="earnings-amount" id="gold-baidu">0</div>
  646.                     <div class="earnings-label">金币</div>
  647.                 </div>
  648.                 <label class="switch">
  649.                     <input type="checkbox" id="enable-baidu" checked>
  650.                     <span class="slider"></span>
  651.                 </label>
  652.             </div>

  653.             <div class="platform-card">
  654.                 <div class="platform-icon fanqie">&#128214;</div>
  655.                 <div class="platform-info">
  656.                     <div class="platform-name">番茄小说</div>
  657.                     <div class="platform-status ready" id="status-fanqie">&#9989; 准备就绪</div>
  658.                     <div class="progress-bar"><div class="progress-fill" id="progress-fanqie" style="width: 0%"></div></div>
  659.                 </div>
  660.                 <div class="platform-earnings">
  661.                     <div class="earnings-amount" id="gold-fanqie">0</div>
  662.                     <div class="earnings-label">金币</div>
  663.                 </div>
  664.                 <label class="switch">
  665.                     <input type="checkbox" id="enable-fanqie" checked>
  666.                     <span class="slider"></span>
  667.                 </label>
  668.             </div>
  669.         </div>

  670.         <!-- 控制面板 -->
  671.         <div class="control-panel">
  672.             <button class="main-btn btn-start" id="btnStart" onclick="startHarvest()">
  673.                 <span>&#128640;</span>
  674.                 <span>开始收割金币</span>
  675.             </button>
  676.             <button class="main-btn btn-stop" id="btnStop" onclick="stopHarvest()">
  677.                 <span>&#9209;&#65039;</span>
  678.                 <span>停止收割</span>
  679.             </button>

  680.             <div class="mode-selector">
  681.                 <button class="mode-btn active" data-mode="smart" onclick="setMode('smart')">
  682.                     &#129302; 智能模式
  683.                 </button>
  684.                 <button class="mode-btn" data-mode="aggressive" onclick="setMode('aggressive')">
  685.                     &#9889; 激进模式
  686.                 </button>
  687.                 <button class="mode-btn" data-mode="safe" onclick="setMode('safe')">
  688.                     &#128737;&#65039; 安全模式
  689.                 </button>
  690.             </div>
  691.         </div>

  692.         <!-- 日志区域 - 放大版 -->
  693.         <div class="log-section">
  694.             <div class="log-header">
  695.                 <div class="log-title">
  696.                     <span class="log-title-icon">&#128203;</span>
  697.                     <span class="log-title-text">实时日志窗口</span>
  698.                 </div>
  699.                 <div class="log-stats">
  700.                     <div class="log-stat" id="logCount">日志: 0</div>
  701.                     <div class="log-stat" id="errorCount">错误: 0</div>
  702.                 </div>
  703.             </div>
  704.             
  705.             <div class="log-toolbar">
  706.                 <button class="log-btn" onclick="clearLogs()">
  707.                     <span>&#128465;&#65039;</span>
  708.                     <span>清空日志</span>
  709.                 </button>
  710.                 <button class="log-btn" onclick="exportLogs()">
  711.                     <span>&#128228;</span>
  712.                     <span>导出日志</span>
  713.                 </button>
  714.                 <button class="log-btn" onclick="scrollToBottom()">
  715.                     <span>&#11015;&#65039;</span>
  716.                     <span>滚动到底部</span>
  717.                 </button>
  718.                 <button class="log-btn" onclick="toggleAutoScroll()">
  719.                     <span id="autoScrollIcon">&#9989;</span>
  720.                     <span>自动滚动</span>
  721.                 </button>
  722.             </div>
  723.             
  724.             <div class="log-filter-bar">
  725.                 <button class="filter-btn active" data-level="all" onclick="filterLogs('all')">全部</button>
  726.                 <button class="filter-btn" data-level="info" onclick="filterLogs('info')">&#8505;&#65039; INFO</button>
  727.                 <button class="filter-btn" data-level="success" onclick="filterLogs('success')">&#9989; SUCCESS</button>
  728.                 <button class="filter-btn" data-level="gold" onclick="filterLogs('gold')">&#128176; GOLD</button>
  729.                 <button class="filter-btn" data-level="warn" onclick="filterLogs('warn')">&#9888;&#65039; WARN</button>
  730.                 <button class="filter-btn" data-level="error" onclick="filterLogs('error')">&#10060; ERROR</button>
  731.             </div>
  732.             
  733.             <div class="log-container" id="logContainer">
  734.                 <div class="log-empty">
  735.                     <div class="log-empty-icon">&#128640;</div>
  736.                     <div class="log-empty-text">等待日志输出...</div>
  737.                 </div>
  738.             </div>
  739.         </div>
  740.     </div>

  741.     <!-- Toast -->
  742.     <div class="toast" id="toast"></div>

  743.     <script>
  744.         // ============================================
  745.         // 金币收割机 Pro - 核心逻辑
  746.         // ============================================
  747.         
  748.         // ES5兼容的日志接收函数(供Native调用)
  749.         function addLog(message, type) {
  750.             type = type || 'info';
  751.             var container = document.getElementById('logContainer');
  752.             if (!container) return;
  753.             
  754.             var icons = {
  755.                 info: '[I]',
  756.                 success: '[S]',
  757.                 gold: '[G]',
  758.                 error: '[E]',
  759.                 warn: '[W]',
  760.                 debug: '[D]'
  761.             };
  762.             var icon = icons[type] || '[I]';
  763.             
  764.             // 移除空状态提示
  765.             var emptyState = container.querySelector('.log-empty');
  766.             if (emptyState) emptyState.remove();
  767.             
  768.             // 创建日志条目(简化版,无时间戳)
  769.             var entry = document.createElement('div');
  770.             entry.className = 'log-entry ' + type;
  771.             entry.setAttribute('data-level', type);
  772.             entry.innerHTML =
  773.                 '<span class="log-icon">' + icon + '</span>' +
  774.                 '<span class="log-level ' + type + '">' + type.toUpperCase() + '</span>' +
  775.                 '<span class="log-message">' + message + '</span>';
  776.             
  777.             container.appendChild(entry);
  778.             container.scrollTop = container.scrollHeight;
  779.         }

  780.         const CONFIG = {
  781.             VERSION: '2.0.0',
  782.             GOLD_TO_RMB: 0.0001, // 金币转人民币比例
  783.             AD_WATCH_TIME: 35000, // 广告观看时间(毫秒)
  784.             COOLDOWN_TIME: 5000, // 冷却时间
  785.         };

  786.         const state = {
  787.             isRunning: false,
  788.             mode: 'smart',
  789.             todayGold: 0,
  790.             adCount: 0,
  791.             startTime: null,
  792.             autoScroll: true,
  793.             currentFilter: 'all',
  794.             logCount: 0,
  795.             errorCount: 0,
  796.             platforms: {
  797.                 douyin: { enabled: true, gold: 0, status: 'ready', name: '抖音极速版' },
  798.                 kuaishou: { enabled: true, gold: 0, status: 'ready', name: '快手极速版' },
  799.                 baidu: { enabled: true, gold: 0, status: 'ready', name: '百度极速版' },
  800.                 fanqie: { enabled: true, gold: 0, status: 'ready', name: '番茄小说' }
  801.             }
  802.         };

  803.         const LOG_ICONS = {
  804.             info: '&#8505;&#65039;',
  805.             success: '&#9989;',
  806.             gold: '&#128176;',
  807.             error: '&#10060;',
  808.             warn: '&#9888;&#65039;',
  809.             debug: '&#128269;'
  810.         };

  811.         // 初始化金币雨
  812.         function initCoinRain() {
  813.             const container = document.getElementById('coinsRain');
  814.             const coins = ['&#128176;', '&#128142;', '&#129689;', '&#128181;', '&#128180;'];
  815.             
  816.             for (let i = 0; i < 20; i++) {
  817.                 const coin = document.createElement('div');
  818.                 coin.className = 'coin';
  819.                 coin.textContent = coins[Math.floor(Math.random() * coins.length)];
  820.                 coin.style.left = Math.random() * 100 + '%';
  821.                 coin.style.animationDuration = (Math.random() * 5 + 5) + 's';
  822.                 coin.style.animationDelay = Math.random() * 5 + 's';
  823.                 container.appendChild(coin);
  824.             }
  825.         }

  826.         // 添加日志 - 增强版
  827.         function addLog(message, type) {
  828.             type = type || 'info';
  829.             var container = document.getElementById('logContainer');
  830.             var icon = LOG_ICONS[type] || '&#8505;&#65039;';
  831.             
  832.             // 移除空状态提示
  833.             var emptyState = container.querySelector('.log-empty');
  834.             if (emptyState) emptyState.remove();
  835.             
  836.             // 创建日志条目
  837.             var entry = document.createElement('div');
  838.             entry.className = 'log-entry ' + type;
  839.             entry.setAttribute('data-level', type);
  840.             entry.innerHTML =
  841.                 '<span class="log-icon">' + icon + '</span>' +
  842.                 '<span class="log-level ' + type + '">' + type.toUpperCase() + '</span>' +
  843.                 '<span class="log-message">' + escapeHtml(message) + '</span>';
  844.             
  845.             // 根据过滤器决定是否显示
  846.             if (state.currentFilter !== 'all' && type !== state.currentFilter) {
  847.                 entry.style.display = 'none';
  848.             }
  849.             
  850.             container.appendChild(entry);
  851.             
  852.             // 更新统计
  853.             state.logCount++;
  854.             if (type === 'error') state.errorCount++;
  855.             updateLogStats();
  856.             
  857.             // 自动滚动
  858.             if (state.autoScroll) {
  859.                 scrollToBottom();
  860.             }
  861.             
  862.             // 限制日志数量
  863.             while (container.children.length > 200) {
  864.                 container.removeChild(container.firstChild);
  865.             }
  866.         }

  867.         // HTML转义
  868.         function escapeHtml(text) {
  869.             const div = document.createElement('div');
  870.             div.textContent = text;
  871.             return div.innerHTML;
  872.         }

  873.         // 更新日志统计
  874.         function updateLogStats() {
  875.             document.getElementById('logCount').textContent = '日志: ' + state.logCount;
  876.             document.getElementById('errorCount').textContent = '错误: ' + state.errorCount;
  877.         }

  878.         // 滚动到底部
  879.         function scrollToBottom() {
  880.             const container = document.getElementById('logContainer');
  881.             container.scrollTop = container.scrollHeight;
  882.         }

  883.         // 切换自动滚动
  884.         function toggleAutoScroll() {
  885.             state.autoScroll = !state.autoScroll;
  886.             document.getElementById('autoScrollIcon').textContent = state.autoScroll ? '&#9989;' : '&#10060;';
  887.         }

  888.         // 过滤日志
  889.         function filterLogs(level) {
  890.             state.currentFilter = level;
  891.             
  892.             // 更新按钮状态
  893.             document.querySelectorAll('.filter-btn').forEach(btn => {
  894.                 btn.classList.toggle('active', btn.dataset.level === level);
  895.             });
  896.             
  897.             // 过滤显示
  898.             const container = document.getElementById('logContainer');
  899.             const entries = container.querySelectorAll('.log-entry');
  900.             entries.forEach(entry => {
  901.                 const entryLevel = entry.getAttribute('data-level');
  902.                 if (level === 'all' || entryLevel === level) {
  903.                     entry.style.display = 'flex';
  904.                 } else {
  905.                     entry.style.display = 'none';
  906.                 }
  907.             });
  908.         }

  909.         // 导出日志
  910.         function exportLogs() {
  911.             const container = document.getElementById('logContainer');
  912.             const entries = container.querySelectorAll('.log-entry');
  913.             let text = '';
  914.             entries.forEach(entry => {
  915.                 const level = entry.querySelector('.log-level').textContent;
  916.                 const msg = entry.querySelector('.log-message').textContent;
  917.                 text += '[' + level + '] ' + msg + '\n';
  918.             });
  919.             
  920.             // 尝试通过桥接发送
  921.             if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.exportLogs) {
  922.                 window.webkit.messageHandlers.exportLogs.postMessage(text);
  923.             } else {
  924.                 // 显示提示
  925.                 showToast('&#128228; 日志已导出 (' + entries.length + ' 条)');
  926.                 console.log('导出日志:\n' + text);
  927.             }
  928.         }

  929.         // 显示Toast
  930.         function showToast(message) {
  931.             const toast = document.getElementById('toast');
  932.             toast.textContent = message;
  933.             toast.classList.add('show');
  934.             setTimeout(() => toast.classList.remove('show'), 3000);
  935.         }

  936.         // 更新金币显示
  937.         function updateGoldDisplay() {
  938.             document.getElementById('todayGold').textContent = state.todayGold.toLocaleString();
  939.             document.getElementById('rmbValue').textContent = (state.todayGold * CONFIG.GOLD_TO_RMB).toFixed(2);
  940.             document.getElementById('adCount').textContent = state.adCount;
  941.             
  942.             // 更新运行时间
  943.             if (state.startTime) {
  944.                 const minutes = Math.floor((Date.now() - state.startTime) / 60000);
  945.                 document.getElementById('runTime').textContent = minutes;
  946.             }
  947.             
  948.             // 更新各平台金币
  949.             Object.keys(state.platforms).forEach(key => {
  950.                 document.getElementById('gold-' + key).textContent = state.platforms[key].gold;
  951.             });
  952.         }

  953.         // 设置模式
  954.         function setMode(mode) {
  955.             state.mode = mode;
  956.             document.querySelectorAll('.mode-btn').forEach(btn => {
  957.                 btn.classList.toggle('active', btn.dataset.mode === mode);
  958.             });
  959.             addLog(`切换到${mode === 'smart' ? '智能' : mode === 'aggressive' ? '激进' : '安全'}模式`, 'info');
  960.         }

  961.         // 开始收割
  962.         async function startHarvest() {
  963.             if (state.isRunning) return;
  964.             
  965.             state.isRunning = true;
  966.             state.startTime = Date.now();
  967.             
  968.             document.getElementById('btnStart').classList.add('hidden');
  969.             document.getElementById('btnStop').classList.add('active');
  970.             
  971.             addLog('&#128640; 开始自动收割金币!', 'success');
  972.             showToast('&#128640; 金币收割已启动!');
  973.             
  974.             // 开始收割循环
  975.             harvestLoop();
  976.         }

  977.         // 停止收割
  978.         function stopHarvest() {
  979.             state.isRunning = false;
  980.             
  981.             document.getElementById('btnStart').classList.remove('hidden');
  982.             document.getElementById('btnStop').classList.remove('active');
  983.             
  984.             // 重置所有平台状态
  985.             Object.keys(state.platforms).forEach(key => {
  986.                 state.platforms[key].status = 'ready';
  987.                 updatePlatformStatus(key, 'ready');
  988.             });
  989.             
  990.             addLog('&#9209;&#65039; 金币收割已停止', 'info');
  991.             showToast('&#9209;&#65039; 已停止收割');
  992.         }

  993.         // 收割循环
  994.         async function harvestLoop() {
  995.             while (state.isRunning) {
  996.                 const enabledPlatforms = Object.keys(state.platforms).filter(key =>
  997.                     document.getElementById('enable-' + key).checked
  998.                 );
  999.                
  1000.                 if (enabledPlatforms.length === 0) {
  1001.                     addLog('&#9888;&#65039; 请至少选择一个平台', 'warning');
  1002.                     stopHarvest();
  1003.                     break;
  1004.                 }
  1005.                
  1006.                 for (const platform of enabledPlatforms) {
  1007.                     if (!state.isRunning) break;
  1008.                     await harvestPlatform(platform);
  1009.                 }
  1010.                
  1011.                 // 根据模式调整间隔
  1012.                 const interval = state.mode === 'aggressive' ? 2000 : state.mode === 'safe' ? 8000 : 5000;
  1013.                 await sleep(interval);
  1014.             }
  1015.         }

  1016.         // 收割单个平台
  1017.         async function harvestPlatform(platform) {
  1018.             const p = state.platforms[platform];
  1019.             p.status = 'running';
  1020.             updatePlatformStatus(platform, 'running');
  1021.             
  1022.             addLog(`&#128241; 开始收割 ${p.name}`, 'info');
  1023.             
  1024.             // 模拟打开应用
  1025.             await sleep(1000);
  1026.             
  1027.             // 模拟看广告过程
  1028.             for (let i = 0; i <= 100; i += 10) {
  1029.                 if (!state.isRunning) break;
  1030.                 document.getElementById('progress-' + platform).style.width = i + '%';
  1031.                 await sleep(CONFIG.AD_WATCH_TIME / 10);
  1032.             }
  1033.             
  1034.             // 获得金币奖励
  1035.             const reward = Math.floor(Math.random() * 500) + 200;
  1036.             p.gold += reward;
  1037.             state.todayGold += reward;
  1038.             state.adCount++;
  1039.             
  1040.             addLog(`&#128176; ${p.name} 获得 ${reward} 金币!`, 'gold');
  1041.             
  1042.             // 更新显示
  1043.             updateGoldDisplay();
  1044.             
  1045.             // 冷却
  1046.             p.status = 'cooldown';
  1047.             updatePlatformStatus(platform, 'cooldown');
  1048.             await sleep(CONFIG.COOLDOWN_TIME);
  1049.             
  1050.             p.status = 'ready';
  1051.             updatePlatformStatus(platform, 'ready');
  1052.             document.getElementById('progress-' + platform).style.width = '0%';
  1053.         }

  1054.         // 更新平台状态显示
  1055.         function updatePlatformStatus(platform, status) {
  1056.             const statusEl = document.getElementById('status-' + platform);
  1057.             const texts = {
  1058.                 ready: '&#9989; 准备就绪',
  1059.                 running: '&#9889; 正在收割...',
  1060.                 cooldown: '&#9201;&#65039; 冷却中...'
  1061.             };
  1062.             statusEl.textContent = texts[status];
  1063.             statusEl.className = 'platform-status ' + status;
  1064.         }

  1065.         // 清空日志
  1066.         function clearLogs() {
  1067.             state.logCount = 0;
  1068.             state.errorCount = 0;
  1069.             updateLogStats();
  1070.             document.getElementById('logContainer').innerHTML =
  1071.                 '<div class="log-empty">' +
  1072.                     '<div class="log-empty-icon">&#128640;</div>' +
  1073.                     '<div class="log-empty-text">等待日志输出...</div>' +
  1074.                 '</div>';
  1075.             showToast('&#128465;&#65039; 日志已清空');
  1076.         }

  1077.         // 工具函数
  1078.         function sleep(ms) {
  1079.             return new Promise(resolve => setTimeout(resolve, ms));
  1080.         }

  1081.         // 初始化
  1082.         document.addEventListener('DOMContentLoaded', function() {
  1083.             initCoinRain();
  1084.             updateGoldDisplay();
  1085.             addLog('&#128142; 金币收割机 Pro v' + CONFIG.VERSION + ' 已就绪', 'success');
  1086.             addLog('&#128241; 支持平台: 抖音/快手/百度/番茄', 'info');
  1087.             
  1088.             // 自动滑动三次
  1089.             setTimeout(function() {
  1090.                 for (var i = 0; i < 3; i++) {
  1091.                     setTimeout(function() {
  1092.                         window.scrollBy(0, 300);
  1093.                     }, i * 500);
  1094.                 }
  1095.             }, 1000);
  1096.         });

  1097.         // 监听平台开关
  1098.         Object.keys(state.platforms).forEach(key => {
  1099.             document.getElementById('enable-' + key).addEventListener('change', function() {
  1100.                 const action = this.checked ? '启用' : '禁用';
  1101.                 addLog(`${action} ${state.platforms[key].name}`, 'info');
  1102.             });
  1103.         });
  1104.     </script>
  1105. </body>
  1106. </html>
复制代码

  1. // &#127822;交流QQ群:711841924(群)
  2. // &#127822;交流QQ群:528816639  (安卓内测群)

  3. // 初始化一个activity页面
  4. var ac = new activity();

  5. ac.loadXML(`
  6. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  7.     android:layout_width="match_parent"
  8.     android:layout_height="match_parent"
  9.     android:orientation="vertical"
  10. >
  11.     <WebView
  12.         android:id="@+id/web"
  13.         android:layout_width="match_parent"
  14.         android:layout_height="0dp"
  15.         android:layout_weight="1" />
  16. </LinearLayout>
  17. `);

  18. // 延迟确保布局加载完成
  19. sleep.millisecond(400);

  20. // 获取 WebView 组件
  21. var web1 = ac.findWebViewById('web');
  22. // 将WebView对象暴露为全局变量,供主脚本使用
  23. global.web1 = web1;

  24. // 加载本地 HTML 文件(使用绝对路径)
  25. web1.url('/代码/h5.html');

  26. // 三秒倒计时
  27. printl("\n3 秒后启动...");
  28. for (var i = 3; i > 0; i--) {
  29.     printl(i + "...");
  30.     sleep.millisecond(1000);
  31. }
  32. printl("启动完成!\n");

  33. // 导入日志桥接器
  34. Import("LogBridge.js");

  35. // 初始化日志桥接(会阻塞等待WebView加载完成)
  36. LogManagerH5.init(web1, ac);

  37. // 定义 H5 中调用的函数
  38. function test(arg) {
  39.     LogManagerH5.info("我被 H5 调用了,参数是: " + arg);
  40. }

  41. // 定义返回桌面的函数,供H5页面调用
  42. function returnToHome() {
  43.     LogManagerH5.info("执行返回桌面操作");
  44.     // 安卓环境下的返回桌面操作
  45.     if (typeof device !== 'undefined' && device.home) {
  46.         device.home();
  47.     } else {
  48.         LogManagerH5.warn("返回桌面功能在当前环境不可用");
  49.     }
  50. }

  51. // 发送测试日志到H5界面
  52. LogManagerH5.success("系统启动成功");
  53. LogManagerH5.info("WebView已就绪");

  54. // ============================================
  55. // 导入并执行 PrintLogSystem 演示
  56. // ============================================

  57. // 导入并执行 PrintLogSystem 演示
  58. Import("PrintLogSystem.js");

  59. // 延迟执行,确保文件加载完成
  60. sleep.millisecond(100);

  61. // 执行演示(确保 PrintLogSystem.js 已加载)
  62. if (typeof runPrintLogSystemDemo === 'function') {
  63.     runPrintLogSystemDemo();
  64. } else {
  65.     LogManagerH5.error("PrintLogSystem.js 加载失败");
  66. }
  67. /**
  68. * ============================================
  69. * &#127822; print日志系统完整示例
  70. * 功能: 日志记录、调试输出、画中画管理
  71. * 交流QQ群: 711841924 (群一) / 528816639 (苹果内测群)
  72. * ============================================
  73. */
复制代码


2.png
1.png
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|

GMT+8, 2026-10-16 18:17

宣传软件 · 信息发布软件 · b2b软件 · 广告发布软件

快速回复 返回顶部 返回列表