注册 登录
发贴工具
查看: 1|回复: 0
打印 上一主题 下一主题

[24小时收录超级好的网站] 安卓H5互动config配置调取存入示例

[复制链接]

2503

主题

2551

帖子

1万

积分

积分
15204
跳转到指定楼层
楼主
本帖最后由 发帖软件 于 2026-3-20 07:15 编辑

安卓H5互动config配置调取存入示例

  1. <!DOCTYPE html>
  2. <!--
  3. &#127822;交流 QQ 群:711841924(群一 - 苹果内测群)
  4. &#127822;交流 QQ 群:528816639
  5. &#127822; AIWROK 配置管理器 - 可视化配置界面
  6. -->
  7. <html lang="zh-CN">
  8. <head>
  9.     <meta charset="UTF-8">
  10.     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  11.     <meta name="apple-mobile-web-app-capable" content="yes">
  12.     <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  13.     <title>⚙️ AIWROK 配置管理中心</title>
  14.     <style>
  15.         * { margin: 0; padding: 0; box-sizing: border-box; }
  16.         
  17.         :root {
  18.             --primary: #4A90E2;
  19.             --primary-dark: #357ABD;
  20.             --success: #2ECC71;
  21.             --warning: #F39C12;
  22.             --danger: #E74C3C;
  23.             --purple: #9B59B6;
  24.             --bg-dark: #1a1a2e;
  25.             --bg-card: #16213e;
  26.             --bg-input: #0f0f23;
  27.             --text-primary: #ffffff;
  28.             --text-secondary: #a0a0a0;
  29.             --border-color: rgba(255, 255, 255, 0.1);
  30.         }

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

  38.         /* QQ 群信息栏 */
  39.         .qq-group-bar {
  40.             background: linear-gradient(90deg, #FF6B6B 0%, #FF8E53 50%, #FFD700 100%);
  41.             padding: 10px 16px;
  42.             text-align: center;
  43.             position: relative;
  44.             z-index: 20;
  45.             box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  46.         }

  47.         .qq-group-text {
  48.             font-size: 13px;
  49.             font-weight: 700;
  50.             color: #fff;
  51.             text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  52.         }

  53.         .app-container {
  54.             position: relative;
  55.             z-index: 10;
  56.             max-width: 600px;
  57.             margin: 0 auto;
  58.             padding: 16px;
  59.         }

  60.         /* 顶部标题 */
  61.         .header {
  62.             background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  63.             border-radius: 20px;
  64.             padding: 24px;
  65.             margin-bottom: 20px;
  66.             box-shadow: 0 10px 40px rgba(74, 144, 226, 0.3);
  67.             text-align: center;
  68.         }

  69.         .header-icon {
  70.             font-size: 48px;
  71.             margin-bottom: 8px;
  72.         }

  73.         .header-title {
  74.             font-size: 24px;
  75.             font-weight: 800;
  76.             margin-bottom: 4px;
  77.         }

  78.         .header-subtitle {
  79.             font-size: 13px;
  80.             opacity: 0.9;
  81.         }

  82.         /* 统计卡片 */
  83.         .stats-row {
  84.             display: grid;
  85.             grid-template-columns: repeat(3, 1fr);
  86.             gap: 12px;
  87.             margin-bottom: 20px;
  88.         }

  89.         .stat-box {
  90.             background: var(--bg-card);
  91.             border-radius: 16px;
  92.             padding: 16px 8px;
  93.             text-align: center;
  94.             border: 1px solid rgba(74, 144, 226, 0.2);
  95.         }

  96.         .stat-icon {
  97.             font-size: 24px;
  98.             margin-bottom: 4px;
  99.         }

  100.         .stat-value {
  101.             font-size: 20px;
  102.             font-weight: 800;
  103.             color: var(--primary);
  104.         }

  105.         .stat-label {
  106.             font-size: 11px;
  107.             color: var(--text-secondary);
  108.             margin-top: 2px;
  109.         }

  110.         /* 分类标签 */
  111.         .category-tabs {
  112.             display: flex;
  113.             gap: 8px;
  114.             margin-bottom: 20px;
  115.             overflow-x: auto;
  116.             padding-bottom: 8px;
  117.         }

  118.         .category-tab {
  119.             padding: 10px 20px;
  120.             background: var(--bg-card);
  121.             border: 1px solid var(--border-color);
  122.             border-radius: 25px;
  123.             font-size: 13px;
  124.             font-weight: 600;
  125.             color: var(--text-secondary);
  126.             cursor: pointer;
  127.             white-space: nowrap;
  128.             transition: all 0.3s ease;
  129.         }

  130.         .category-tab:hover {
  131.             border-color: var(--primary);
  132.             color: var(--primary);
  133.         }

  134.         .category-tab.active {
  135.             background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  136.             color: white;
  137.             border-color: transparent;
  138.             box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
  139.         }

  140.         /* 配置列表 */
  141.         .config-section {
  142.             background: var(--bg-card);
  143.             border-radius: 20px;
  144.             padding: 20px;
  145.             margin-bottom: 20px;
  146.             border: 1px solid var(--border-color);
  147.         }

  148.         .section-header {
  149.             display: flex;
  150.             align-items: center;
  151.             justify-content: space-between;
  152.             margin-bottom: 16px;
  153.             padding-bottom: 12px;
  154.             border-bottom: 1px solid var(--border-color);
  155.         }

  156.         .section-title {
  157.             display: flex;
  158.             align-items: center;
  159.             gap: 10px;
  160.             font-size: 16px;
  161.             font-weight: 700;
  162.         }

  163.         .section-icon {
  164.             font-size: 20px;
  165.         }

  166.         .section-actions {
  167.             display: flex;
  168.             gap: 8px;
  169.         }

  170.         .action-btn {
  171.             padding: 6px 12px;
  172.             border: none;
  173.             border-radius: 8px;
  174.             font-size: 12px;
  175.             font-weight: 600;
  176.             cursor: pointer;
  177.             transition: all 0.2s ease;
  178.         }

  179.         .btn-reset {
  180.             background: rgba(231, 76, 60, 0.2);
  181.             color: var(--danger);
  182.         }

  183.         .btn-reset:hover {
  184.             background: rgba(231, 76, 60, 0.3);
  185.         }

  186.         .btn-save {
  187.             background: rgba(46, 204, 113, 0.2);
  188.             color: var(--success);
  189.         }

  190.         .btn-save:hover {
  191.             background: rgba(46, 204, 113, 0.3);
  192.         }

  193.         /* 配置项 */
  194.         .config-item {
  195.             margin-bottom: 16px;
  196.             padding-bottom: 16px;
  197.             border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  198.         }

  199.         .config-item:last-child {
  200.             margin-bottom: 0;
  201.             padding-bottom: 0;
  202.             border-bottom: none;
  203.         }

  204.         .config-label {
  205.             display: flex;
  206.             align-items: center;
  207.             justify-content: space-between;
  208.             margin-bottom: 8px;
  209.         }

  210.         .label-text {
  211.             font-size: 14px;
  212.             font-weight: 600;
  213.             display: flex;
  214.             align-items: center;
  215.             gap: 8px;
  216.         }

  217.         .label-hint {
  218.             font-size: 11px;
  219.             color: var(--text-secondary);
  220.             font-weight: normal;
  221.         }

  222.         .config-input-wrapper {
  223.             position: relative;
  224.         }

  225.         .config-input {
  226.             width: 100%;
  227.             padding: 12px 16px;
  228.             border: 1px solid var(--border-color);
  229.             border-radius: 10px;
  230.             background: var(--bg-input);
  231.             color: var(--text-primary);
  232.             font-size: 14px;
  233.             outline: none;
  234.             transition: all 0.3s ease;
  235.         }

  236.         .config-input:focus {
  237.             border-color: var(--primary);
  238.             box-shadow: 0 0 10px rgba(74, 144, 226, 0.2);
  239.         }

  240.         .config-input.readonly {
  241.             background: rgba(255, 255, 255, 0.05);
  242.             cursor: not-allowed;
  243.         }

  244.         /* 开关 */
  245.         .switch {
  246.             position: relative;
  247.             width: 50px;
  248.             height: 26px;
  249.         }

  250.         .switch input {
  251.             opacity: 0;
  252.             width: 0;
  253.             height: 0;
  254.         }

  255.         .slider {
  256.             position: absolute;
  257.             cursor: pointer;
  258.             top: 0;
  259.             left: 0;
  260.             right: 0;
  261.             bottom: 0;
  262.             background-color: #333;
  263.             transition: .4s;
  264.             border-radius: 26px;
  265.         }

  266.         .slider:before {
  267.             position: absolute;
  268.             content: "";
  269.             height: 20px;
  270.             width: 20px;
  271.             left: 3px;
  272.             bottom: 3px;
  273.             background-color: white;
  274.             transition: .4s;
  275.             border-radius: 50%;
  276.         }

  277.         input:checked + .slider {
  278.             background: linear-gradient(135deg, var(--success) 0%, #27AE60 100%);
  279.         }

  280.         input:checked + .slider:before {
  281.             transform: translateX(24px);
  282.         }

  283.         /* 按钮组 */
  284.         .button-group {
  285.             display: grid;
  286.             grid-template-columns: repeat(2, 1fr);
  287.             gap: 12px;
  288.             margin-top: 20px;
  289.         }

  290.         .main-btn {
  291.             padding: 16px;
  292.             border: none;
  293.             border-radius: 16px;
  294.             font-size: 16px;
  295.             font-weight: 800;
  296.             cursor: pointer;
  297.             transition: all 0.3s ease;
  298.             display: flex;
  299.             align-items: center;
  300.             justify-content: center;
  301.             gap: 8px;
  302.         }

  303.         .btn-primary {
  304.             background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  305.             color: white;
  306.             box-shadow: 0 8px 32px rgba(74, 144, 226, 0.4);
  307.         }

  308.         .btn-primary:hover {
  309.             transform: translateY(-2px);
  310.             box-shadow: 0 12px 40px rgba(74, 144, 226, 0.5);
  311.         }

  312.         .btn-secondary {
  313.             background: linear-gradient(135deg, var(--purple) 0%, #8E44AD 100%);
  314.             color: white;
  315.             box-shadow: 0 8px 32px rgba(155, 89, 182, 0.4);
  316.         }

  317.         .btn-warning {
  318.             background: linear-gradient(135deg, var(--warning) 0%, #E67E22 100%);
  319.             color: white;
  320.             box-shadow: 0 8px 32px rgba(243, 156, 18, 0.4);
  321.         }

  322.         .btn-danger {
  323.             background: linear-gradient(135deg, var(--danger) 0%, #C0392B 100%);
  324.             color: white;
  325.             box-shadow: 0 8px 32px rgba(231, 76, 60, 0.4);
  326.         }

  327.         /* Toast */
  328.         .toast {
  329.             position: fixed;
  330.             bottom: 100px;
  331.             left: 50%;
  332.             transform: translateX(-50%) translateY(100px);
  333.             background: linear-gradient(135deg, var(--success) 0%, #27AE60 100%);
  334.             color: white;
  335.             padding: 16px 32px;
  336.             border-radius: 50px;
  337.             font-weight: 700;
  338.             opacity: 0;
  339.             transition: all 0.3s ease;
  340.             z-index: 9999;
  341.             box-shadow: 0 8px 32px rgba(46, 204, 113, 0.4);
  342.         }

  343.         .toast.show {
  344.             opacity: 1;
  345.             transform: translateX(-50%) translateY(0);
  346.         }

  347.         .toast.error {
  348.             background: linear-gradient(135deg, var(--danger) 0%, #C0392B 100%);
  349.         }

  350.         /* 日志窗口 */
  351.         .log-panel {
  352.             background: var(--bg-card);
  353.             border-radius: 20px;
  354.             padding: 20px;
  355.             margin-top: 20px;
  356.             border: 1px solid var(--border-color);
  357.         }

  358.         .log-header {
  359.             display: flex;
  360.             align-items: center;
  361.             justify-content: space-between;
  362.             margin-bottom: 16px;
  363.         }

  364.         .log-title {
  365.             display: flex;
  366.             align-items: center;
  367.             gap: 10px;
  368.             font-size: 16px;
  369.             font-weight: 700;
  370.         }

  371.         .log-container {
  372.             background: var(--bg-input);
  373.             border-radius: 12px;
  374.             padding: 12px;
  375.             max-height: 300px;
  376.             overflow-y: auto;
  377.             font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
  378.             font-size: 12px;
  379.             line-height: 1.8;
  380.         }

  381.         .log-entry {
  382.             padding: 4px 8px;
  383.             margin-bottom: 4px;
  384.             border-radius: 4px;
  385.             border-left: 3px solid var(--primary);
  386.         }

  387.         .log-entry.success { border-left-color: var(--success); }
  388.         .log-entry.error { border-left-color: var(--danger); }
  389.         .log-entry.warning { border-left-color: var(--warning); }

  390.         /* 动画 */
  391.         @keyframes slideUp {
  392.             from { opacity: 0; transform: translateY(20px); }
  393.             to { opacity: 1; transform: translateY(0); }
  394.         }

  395.         .config-section {
  396.             animation: slideUp 0.4s ease;
  397.         }
  398.     </style>
  399. </head>
  400. <body>
  401.     <!-- QQ 群信息栏 -->
  402.     <div class="qq-group-bar">
  403.         <span class="qq-group-text">&#127822;交流 QQ 群:711841924(群一 - 苹果内测群)528816639</span>
  404.     </div>

  405.     <div class="app-container">
  406.         <!-- 顶部标题 -->
  407.         <div class="header">
  408.             <div class="header-icon">⚙️</div>
  409.             <div class="header-title">AIWROK 配置管理中心</div>
  410.             <div class="header-subtitle">可视化配置管理 · 实时同步 · 智能推荐</div>
  411.         </div>

  412.         <!-- 统计卡片 -->
  413.         <div class="stats-row">
  414.             <div class="stat-box">
  415.                 <div class="stat-icon">&#128202;</div>
  416.                 <div class="stat-value" id="totalConfigs">0</div>
  417.                 <div class="stat-label">总配置数</div>
  418.             </div>
  419.             <div class="stat-box">
  420.                 <div class="stat-icon">✅</div>
  421.                 <div class="stat-value" id="configuredCount">0</div>
  422.                 <div class="stat-label">已配置</div>
  423.             </div>
  424.             <div class="stat-box">
  425.                 <div class="stat-icon">&#128190;</div>
  426.                 <div class="stat-value" id="lastSaveTime">-</div>
  427.                 <div class="stat-label">最后保存</div>
  428.             </div>
  429.         </div>

  430.         <!-- 分类标签 -->
  431.         <div class="category-tabs">
  432.             <div class="category-tab active" data-category="all" onclick="filterCategory('all')">全部</div>
  433.             <div class="category-tab" data-category="game" onclick="filterCategory('game')">&#127918; 游戏配置</div>
  434.             <div class="category-tab" data-category="ocr" onclick="filterCategory('ocr')">&#128269; OCR 配置</div>
  435.             <div class="category-tab" data-category="ui" onclick="filterCategory('ui')">&#127912; UI 配置</div>
  436.             <div class="category-tab" data-category="network" onclick="filterCategory('network')">&#127760; 网络配置</div>
  437.         </div>

  438.         <!-- 游戏配置 -->
  439.         <div class="config-section" data-category="game">
  440.             <div class="section-header">
  441.                 <div class="section-title">
  442.                     <span class="section-icon">&#127918;</span>
  443.                     <span>游戏自动化配置</span>
  444.                 </div>
  445.                 <div class="section-actions">
  446.                     <button class="action-btn btn-reset" onclick="resetGameConfig()">重置</button>
  447.                     <button class="action-btn btn-save" onclick="saveGameConfig()">保存</button>
  448.                 </div>
  449.             </div>

  450.             <div class="config-item">
  451.                 <div class="config-label">
  452.                     <span class="label-text">
  453.                         &#128221; 游戏名称
  454.                         <span class="label-hint">要自动化的游戏</span>
  455.                     </span>
  456.                 </div>
  457.                 <input type="text" class="config-input" id="game_name" value="梦幻西游" placeholder="输入游戏名称">
  458.             </div>

  459.             <div class="config-item">
  460.                 <div class="config-label">
  461.                     <span class="label-text">
  462.                         ⏱️ 任务延迟 (毫秒)
  463.                         <span class="label-hint">操作间隔时间</span>
  464.                     </span>
  465.                 </div>
  466.                 <input type="number" class="config-input" id="task_delay" value="2000" min="500" max="10000">
  467.             </div>

  468.             <div class="config-item">
  469.                 <div class="config-label">
  470.                     <span class="label-text">
  471.                         &#128260; 最大轮数
  472.                         <span class="label-hint">最多执行轮次</span>
  473.                     </span>
  474.                 </div>
  475.                 <input type="number" class="config-input" id="max_rounds" value="10" min="1" max="100">
  476.             </div>

  477.             <div class="config-item">
  478.                 <div class="config-label">
  479.                     <span class="label-text">⚔️ 启用自动战斗</span>
  480.                     <label class="switch">
  481.                         <input type="checkbox" id="enable_combat" checked>
  482.                         <span class="slider"></span>
  483.                     </label>
  484.                 </div>
  485.             </div>

  486.             <div class="config-item">
  487.                 <div class="config-label">
  488.                     <span class="label-text">&#128138; 自动治疗</span>
  489.                     <label class="switch">
  490.                         <input type="checkbox" id="auto_heal" checked>
  491.                         <span class="slider"></span>
  492.                     </label>
  493.                 </div>
  494.             </div>
  495.         </div>

  496.         <!-- OCR 配置 -->
  497.         <div class="config-section" data-category="ocr">
  498.             <div class="section-header">
  499.                 <div class="section-title">
  500.                     <span class="section-icon">&#128269;</span>
  501.                     <span>OCR 识别配置</span>
  502.                 </div>
  503.                 <div class="section-actions">
  504.                     <button class="action-btn btn-reset" onclick="resetOcrConfig()">重置</button>
  505.                     <button class="action-btn btn-save" onclick="saveOcrConfig()">保存</button>
  506.                 </div>
  507.             </div>

  508.             <div class="config-item">
  509.                 <div class="config-label">
  510.                     <span class="label-text">
  511.                         &#127760; 识别语言
  512.                         <span class="label-hint">OCR 识别语言</span>
  513.                     </span>
  514.                 </div>
  515.                 <select class="config-input" id="ocr_language">
  516.                     <option value="zh-CN">简体中文</option>
  517.                     <option value="zh-TW">繁体中文</option>
  518.                     <option value="en">英文</option>
  519.                     <option value="ja">日文</option>
  520.                     <option value="ko">韩文</option>
  521.                 </select>
  522.             </div>

  523.             <div class="config-item">
  524.                 <div class="config-label">
  525.                     <span class="label-text">
  526.                         &#127919; 置信度阈值 (%)
  527.                         <span class="label-hint">最低识别置信度</span>
  528.                     </span>
  529.                 </div>
  530.                 <input type="number" class="config-input" id="ocr_confidence" value="80" min="50" max="100">
  531.             </div>

  532.             <div class="config-item">
  533.                 <div class="config-label">
  534.                     <span class="label-text">
  535.                         ⏰ 超时时间 (毫秒)
  536.                         <span class="label-hint">识别超时限制</span>
  537.                     </span>
  538.                 </div>
  539.                 <input type="number" class="config-input" id="ocr_timeout" value="5000" min="1000" max="30000">
  540.             </div>

  541.             <div class="config-item">
  542.                 <div class="config-label">
  543.                     <span class="label-text">&#128260; 重试次数</span>
  544.                     <label class="switch">
  545.                         <input type="number" class="config-input" id="ocr_retry" value="3" min="0" max="10" style="width: 100px; display: inline-block;">
  546.                     </label>
  547.                 </div>
  548.             </div>
  549.         </div>

  550.         <!-- UI 配置 -->
  551.         <div class="config-section" data-category="ui">
  552.             <div class="section-header">
  553.                 <div class="section-title">
  554.                     <span class="section-icon">&#127912;</span>
  555.                     <span>界面偏好配置</span>
  556.                 </div>
  557.                 <div class="section-actions">
  558.                     <button class="action-btn btn-reset" onclick="resetUiConfig()">重置</button>
  559.                     <button class="action-btn btn-save" onclick="saveUiConfig()">保存</button>
  560.                 </div>
  561.             </div>

  562.             <div class="config-item">
  563.                 <div class="config-label">
  564.                     <span class="label-text">&#127763; 主题模式</span>
  565.                     <select class="config-input" id="ui_theme" style="width: 150px;">
  566.                         <option value="dark">深色主题</option>
  567.                         <option value="light">浅色主题</option>
  568.                         <option value="auto">自动跟随</option>
  569.                     </select>
  570.                 </div>
  571.             </div>

  572.             <div class="config-item">
  573.                 <div class="config-label">
  574.                     <span class="label-text">
  575.                         &#128207; 字体大小 (px)
  576.                         <span class="label-hint">界面字体大小</span>
  577.                     </span>
  578.                 </div>
  579.                 <input type="number" class="config-input" id="ui_font_size" value="16" min="12" max="24">
  580.             </div>

  581.             <div class="config-item">
  582.                 <div class="config-label">
  583.                     <span class="label-text">&#129520; 显示工具栏</span>
  584.                     <label class="switch">
  585.                         <input type="checkbox" id="ui_show_toolbar" checked>
  586.                         <span class="slider"></span>
  587.                     </label>
  588.                 </div>
  589.             </div>

  590.             <div class="config-item">
  591.                 <div class="config-label">
  592.                     <span class="label-text">✨ 启用动画效果</span>
  593.                     <label class="switch">
  594.                         <input type="checkbox" id="ui_animation" checked>
  595.                         <span class="slider"></span>
  596.                     </label>
  597.                 </div>
  598.             </div>
  599.         </div>

  600.         <!-- 网络配置 -->
  601.         <div class="config-section" data-category="network">
  602.             <div class="section-header">
  603.                 <div class="section-title">
  604.                     <span class="section-icon">&#127760;</span>
  605.                     <span>网络请求配置</span>
  606.                 </div>
  607.                 <div class="section-actions">
  608.                     <button class="action-btn btn-reset" onclick="resetNetworkConfig()">重置</button>
  609.                     <button class="action-btn btn-save" onclick="saveNetworkConfig()">保存</button>
  610.                 </div>
  611.             </div>

  612.             <div class="config-item">
  613.                 <div class="config-label">
  614.                     <span class="label-text">
  615.                         &#128279; API 基础地址
  616.                         <span class="label-hint">服务器地址</span>
  617.                     </span>
  618.                 </div>
  619.                 <input type="text" class="config-input" id="network_base_url" value="https://api.example.com" placeholder="https://api.example.com">
  620.             </div>

  621.             <div class="config-item">
  622.                 <div class="config-label">
  623.                     <span class="label-text">
  624.                         &#128225; API 版本
  625.                         <span class="label-hint">API 版本号</span>
  626.                     </span>
  627.                 </div>
  628.                 <input type="text" class="config-input" id="network_version" value="v2" placeholder="v2">
  629.             </div>

  630.             <div class="config-item">
  631.                 <div class="config-label">
  632.                     <span class="label-text">
  633.                         ⏰ 请求超时 (毫秒)
  634.                         <span class="label-hint">网络请求超时</span>
  635.                     </span>
  636.                 </div>
  637.                 <input type="number" class="config-input" id="network_timeout" value="10000" min="5000" max="60000">
  638.             </div>

  639.             <div class="config-item">
  640.                 <div class="config-label">
  641.                     <span class="label-text">&#128260; 最大重试次数</span>
  642.                     <input type="number" class="config-input" id="network_retries" value="3" min="0" max="10" style="width: 100px; display: inline-block;">
  643.                 </div>
  644.             </div>
  645.         </div>

  646.         <!-- 操作按钮组 -->
  647.         <div class="button-group">
  648.             <button class="main-btn btn-primary" onclick="saveAllConfigs()">
  649.                 &#128190; 保存所有配置
  650.             </button>
  651.             <button class="main-btn btn-secondary" onclick="exportConfigs()">
  652.                 &#128228; 导出配置
  653.             </button>
  654.             <button class="main-btn btn-warning" onclick="importConfigs()">
  655.                 &#128229; 导入配置
  656.             </button>
  657.             <button class="main-btn btn-danger" onclick="resetAllConfigs()">
  658.                 &#128465;️ 恢复默认
  659.             </button>
  660.         </div>

  661.         <!-- 日志窗口 -->
  662.         <div class="log-panel">
  663.             <div class="log-header">
  664.                 <div class="log-title">
  665.                     <span class="section-icon">&#128203;</span>
  666.                     <span>操作日志</span>
  667.                 </div>
  668.             </div>
  669.             <div class="log-container" id="logContainer">
  670.                 <div class="log-empty" style="text-align: center; padding: 20px; color: #666;">
  671.                     等待操作...
  672.                 </div>
  673.             </div>
  674.         </div>
  675.     </div>

  676.     <!-- Toast -->
  677.     <div class="toast" id="toast"></div>

  678.     <script>
  679.         // ============================================
  680.         // AIWROK 配置管理中心 - 核心逻辑
  681.         // ============================================
  682.         
  683.         var CONFIG = {
  684.             VERSION: '1.0.0'
  685.         };

  686.         var state = {
  687.             totalConfigs: 0,
  688.             configuredCount: 0,
  689.             lastSaveTime: null,
  690.             logs: []
  691.         };

  692.         // 默认配置值
  693.         var defaultConfigs = {
  694.             // 游戏配置
  695.             game_name: "梦幻西游",
  696.             task_delay: "2000",
  697.             max_rounds: "10",
  698.             enable_combat: "true",
  699.             auto_heal: "true",
  700.             
  701.             // OCR 配置
  702.             ocr_language: "zh-CN",
  703.             ocr_confidence: "80",
  704.             ocr_timeout: "5000",
  705.             ocr_retry: "3",
  706.             
  707.             // UI 配置
  708.             ui_theme: "dark",
  709.             ui_font_size: "16",
  710.             ui_show_toolbar: "true",
  711.             ui_animation: "true",
  712.             
  713.             // 网络配置
  714.             network_base_url: "https://api.example.com",
  715.             network_version: "v2",
  716.             network_timeout: "10000",
  717.             network_retries: "3"
  718.         };

  719.         // 初始化
  720.         document.addEventListener('DOMContentLoaded', function() {
  721.             addLog('⚙️ AIWROK 配置管理中心 v' + CONFIG.VERSION + ' 已启动', 'success');
  722.             loadAllConfigs();
  723.             updateStats();
  724.         });

  725.         // 添加日志
  726.         function addLog(message, type) {
  727.             type = type || 'info';
  728.             var container = document.getElementById('logContainer');
  729.             
  730.             // 移除空状态
  731.             var emptyState = container.querySelector('.log-empty');
  732.             if (emptyState) emptyState.remove();
  733.             
  734.             var entry = document.createElement('div');
  735.             entry.className = 'log-entry ' + type;
  736.             entry.textContent = '[' + new Date().toLocaleTimeString() + '] ' + message;
  737.             
  738.             container.appendChild(entry);
  739.             container.scrollTop = container.scrollHeight;
  740.             
  741.             // 限制日志数量
  742.             while (container.children.length > 50) {
  743.                 container.removeChild(container.firstChild);
  744.             }
  745.         }

  746.         // 更新统计
  747.         function updateStats() {
  748.             document.getElementById('totalConfigs').textContent = Object.keys(defaultConfigs).length;
  749.             document.getElementById('configuredCount').textContent = state.configuredCount;
  750.             
  751.             if (state.lastSaveTime) {
  752.                 var time = new Date(state.lastSaveTime);
  753.                 document.getElementById('lastSaveTime').textContent =
  754.                     time.getHours().toString().padStart(2, '0') + ':' +
  755.                     time.getMinutes().toString().padStart(2, '0');
  756.             }
  757.         }

  758.         // 过滤分类
  759.         function filterCategory(category) {
  760.             // 更新标签状态
  761.             var tabs = document.querySelectorAll('.category-tab');
  762.             for (var i = 0; i < tabs.length; i++) {
  763.                 tabs[i].classList.toggle('active', tabs[i].dataset.category === category);
  764.             }
  765.             
  766.             // 过滤配置区块
  767.             var sections = document.querySelectorAll('.config-section');
  768.             for (var j = 0; j < sections.length; j++) {
  769.                 var section = sections[j];
  770.                 if (category === 'all' || section.dataset.category === category) {
  771.                     section.style.display = 'block';
  772.                 } else {
  773.                     section.style.display = 'none';
  774.                 }
  775.             }
  776.             
  777.             addLog('&#128194; 切换到分类:' + category, 'info');
  778.         }

  779.         // 加载配置
  780.         function loadAllConfigs() {
  781.             addLog('&#128229; 正在加载配置...', 'info');
  782.             
  783.             // 尝试从原生环境加载
  784.             for (var key in defaultConfigs) {
  785.                 var element = document.getElementById(key);
  786.                 if (!element) continue;
  787.                
  788.                 var value = getConfigFromNative(key);
  789.                 if (value !== null && value !== undefined && value !== '') {
  790.                     if (element.type === 'checkbox') {
  791.                         element.checked = value === 'true';
  792.                     } else {
  793.                         element.value = value;
  794.                     }
  795.                     state.configuredCount++;
  796.                 } else {
  797.                     if (element.type === 'checkbox') {
  798.                         element.checked = defaultConfigs[key] === 'true';
  799.                     } else {
  800.                         element.value = defaultConfigs[key];
  801.                     }
  802.                 }
  803.             }
  804.             
  805.             addLog('✅ 配置加载完成', 'success');
  806.             updateStats();
  807.         }

  808.         // 从原生环境获取配置(适配 AIWROK)
  809.         function getConfigFromNative(key) {
  810.             // 优先使用 Android 桥接接口
  811.             if (window.android && typeof window.android.getConfig === 'function') {
  812.                 try {
  813.                     var value = window.android.getConfig(key, '');
  814.                     console.log('从 android 接口获取配置 ' + key + ': ' + value);
  815.                     return value;
  816.                 } catch (e) {
  817.                     console.error('android 接口获取配置失败:', e);
  818.                 }
  819.             }
  820.             // 浏览器环境使用 localStorage 模拟
  821.             try {
  822.                 return localStorage.getItem('AIWROK_' + key);
  823.             } catch (e) {
  824.                 return null;
  825.             }
  826.         }

  827.         // 设置配置到原生环境(适配 AIWROK)
  828.         function setConfigToNative(key, value) {
  829.             // 优先使用 Android 桥接接口
  830.             if (window.android && typeof window.android.setConfig === 'function') {
  831.                 try {
  832.                     var result = window.android.setConfig(key, value);
  833.                     console.log('设置配置 ' + key + ' = ' + value + ': ' + (result ? '成功' : '失败'));
  834.                     return result;
  835.                 } catch (e) {
  836.                     console.error('设置配置失败:', e);
  837.                     return false;
  838.                 }
  839.             }
  840.             // 浏览器环境使用 localStorage 模拟
  841.             try {
  842.                 localStorage.setItem('AIWROK_' + key, value);
  843.                 return true;
  844.             } catch (e) {
  845.                 return false;
  846.             }
  847.         }

  848.         // 保存单个分类的配置
  849.         function saveCategoryConfig(category, configKeys) {
  850.             addLog('&#128190; 正在保存' + category + '配置...', 'info');
  851.             
  852.             for (var i = 0; i < configKeys.length; i++) {
  853.                 var key = configKeys[i];
  854.                 var element = document.getElementById(key);
  855.                 if (!element) continue;
  856.                
  857.                 var value;
  858.                 if (element.type === 'checkbox') {
  859.                     value = element.checked ? 'true' : 'false';
  860.                 } else {
  861.                     value = element.value;
  862.                 }
  863.                
  864.                 setConfigToNative(key, value);
  865.                 addLog('  ✓ ' + key + ' = ' + value, 'success');
  866.             }
  867.             
  868.             state.lastSaveTime = Date.now();
  869.             state.configuredCount = Object.keys(defaultConfigs).length;
  870.             updateStats();
  871.             
  872.             showToast('✅ ' + category + '配置已保存');
  873.         }

  874.         // 各个分类的保存函数
  875.         function saveGameConfig() {
  876.             saveCategoryConfig('游戏', ['game_name', 'task_delay', 'max_rounds', 'enable_combat', 'auto_heal']);
  877.         }

  878.         function saveOcrConfig() {
  879.             saveCategoryConfig('OCR', ['ocr_language', 'ocr_confidence', 'ocr_timeout', 'ocr_retry']);
  880.         }

  881.         function saveUiConfig() {
  882.             saveCategoryConfig('UI', ['ui_theme', 'ui_font_size', 'ui_show_toolbar', 'ui_animation']);
  883.         }

  884.         function saveNetworkConfig() {
  885.             saveCategoryConfig('网络', ['network_base_url', 'network_version', 'network_timeout', 'network_retries']);
  886.         }

  887.         // 保存所有配置
  888.         function saveAllConfigs() {
  889.             addLog('&#128190; 正在保存所有配置...', 'info');
  890.             
  891.             for (var key in defaultConfigs) {
  892.                 var element = document.getElementById(key);
  893.                 if (!element) continue;
  894.                
  895.                 var value;
  896.                 if (element.type === 'checkbox') {
  897.                     value = element.checked ? 'true' : 'false';
  898.                 } else {
  899.                     value = element.value;
  900.                 }
  901.                
  902.                 setConfigToNative(key, value);
  903.             }
  904.             
  905.             state.lastSaveTime = Date.now();
  906.             state.configuredCount = Object.keys(defaultConfigs).length;
  907.             updateStats();
  908.             
  909.             addLog('✅ 所有配置已保存', 'success');
  910.             showToast('✅ 所有配置已保存');
  911.         }

  912.         // 重置配置
  913.         function resetCategoryConfig(category, configKeys, displayName) {
  914.             addLog('&#128465;️ 正在重置' + displayName + '配置...', 'warning');
  915.             
  916.             for (var i = 0; i < configKeys.length; i++) {
  917.                 var key = configKeys[i];
  918.                 var element = document.getElementById(key);
  919.                 if (!element) continue;
  920.                
  921.                 var defaultValue = defaultConfigs[key];
  922.                 if (element.type === 'checkbox') {
  923.                     element.checked = defaultValue === 'true';
  924.                 } else {
  925.                     element.value = defaultValue;
  926.                 }
  927.                
  928.                 addLog('  ✓ ' + key + ' 恢复为:' + defaultValue, 'info');
  929.             }
  930.             
  931.             showToast('&#128465;️ ' + displayName + '配置已重置');
  932.         }

  933.         function resetGameConfig() {
  934.             resetCategoryConfig('游戏', ['game_name', 'task_delay', 'max_rounds', 'enable_combat', 'auto_heal'], '游戏');
  935.         }

  936.         function resetOcrConfig() {
  937.             resetCategoryConfig('OCR', ['ocr_language', 'ocr_confidence', 'ocr_timeout', 'ocr_retry'], 'OCR');
  938.         }

  939.         function resetUiConfig() {
  940.             resetCategoryConfig('UI', ['ui_theme', 'ui_font_size', 'ui_show_toolbar', 'ui_animation'], 'UI');
  941.         }

  942.         function resetNetworkConfig() {
  943.             resetCategoryConfig('网络', ['network_base_url', 'network_version', 'network_timeout', 'network_retries'], '网络');
  944.         }

  945.         function resetAllConfigs() {
  946.             if (!confirm('确定要恢复所有配置为默认值吗?')) return;
  947.             
  948.             addLog('&#128465;️ 正在恢复所有配置...', 'warning');
  949.             
  950.             for (var key in defaultConfigs) {
  951.                 var element = document.getElementById(key);
  952.                 if (!element) continue;
  953.                
  954.                 var defaultValue = defaultConfigs[key];
  955.                 if (element.type === 'checkbox') {
  956.                     element.checked = defaultValue === 'true';
  957.                 } else {
  958.                     element.value = defaultValue;
  959.                 }
  960.             }
  961.             
  962.             addLog('✅ 所有配置已恢复默认值', 'success');
  963.             showToast('&#128465;️ 所有配置已恢复默认');
  964.         }

  965.         // 导出配置
  966.         function exportConfigs() {
  967.             addLog('&#128228; 正在导出配置...', 'info');
  968.             
  969.             var exported = {};
  970.             for (var key in defaultConfigs) {
  971.                 var element = document.getElementById(key);
  972.                 if (!element) continue;
  973.                
  974.                 var value;
  975.                 if (element.type === 'checkbox') {
  976.                     value = element.checked ? 'true' : 'false';
  977.                 } else {
  978.                     value = element.value;
  979.                 }
  980.                
  981.                 exported[key] = value;
  982.             }
  983.             
  984.             var jsonStr = JSON.stringify(exported, null, 2);
  985.             addLog('✅ 配置已导出:\n' + jsonStr, 'success');
  986.             
  987.             // 尝试复制到剪贴板
  988.             if (navigator.clipboard) {
  989.                 navigator.clipboard.writeText(jsonStr).then(function() {
  990.                     showToast('&#128228; 配置已导出并复制到剪贴板');
  991.                 }, function() {
  992.                     showToast('&#128228; 配置已导出(请查看日志)');
  993.                 });
  994.             } else {
  995.                 showToast('&#128228; 配置已导出(请查看日志)');
  996.             }
  997.         }

  998.         // 导入配置
  999.         function importConfigs() {
  1000.             var jsonStr = prompt('请粘贴配置 JSON 数据:');
  1001.             if (!jsonStr) return;
  1002.             
  1003.             try {
  1004.                 var imported = JSON.parse(jsonStr);
  1005.                 addLog('&#128229; 正在导入配置...', 'info');
  1006.                
  1007.                 for (var key in imported) {
  1008.                     var element = document.getElementById(key);
  1009.                     if (!element) continue;
  1010.                     
  1011.                     var value = imported[key];
  1012.                     if (element.type === 'checkbox') {
  1013.                         element.checked = value === 'true';
  1014.                     } else {
  1015.                         element.value = String(value);
  1016.                     }
  1017.                     
  1018.                     addLog('  ✓ 导入 ' + key + ' = ' + value, 'success');
  1019.                 }
  1020.                
  1021.                 addLog('✅ 配置导入完成', 'success');
  1022.                 showToast('&#128229; 配置已成功导入');
  1023.             } catch (e) {
  1024.                 addLog('❌ 配置导入失败:' + e.message, 'error');
  1025.                 showToast('❌ 配置格式错误');
  1026.             }
  1027.         }

  1028.         // 显示 Toast
  1029.         function showToast(message, isError) {
  1030.             var toast = document.getElementById('toast');
  1031.             toast.textContent = message;
  1032.             toast.className = 'toast show' + (isError ? ' error' : '');
  1033.             
  1034.             setTimeout(function() {
  1035.                 toast.className = 'toast';
  1036.             }, 3000);
  1037.         }
  1038.     </script>
  1039. </body>
  1040. </html>
复制代码





unto苹果脚本和H5配置config小实例nextnocontent
回复

使用道具 举报

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

本版积分规则

相关导读了
    采集亚马逊正版群发工具有没有?
    Apr.20旅行X心语今天来说说YYPOST新功能的一个灵活用法,采集亚马逊商品信息,并且获得排名的软件,亚马逊现在越来越多客户做,淘宝的水是越来越清了,以前做电商的客户,现在都转战到外国,最赚钱的要数一些客户往亚马逊里堆了吧,拿我这个YYPOST的客户,最多的是采集,分析排名,刷价格,刷数量,改价,刷访问量等等技术

    企业发展B2B网站有什么东东软件可以发呢
    标题企业发展网B2B软件,现在虽然B2B网站收录不错,可愁的是心急的人们,他们太想一口吃撑胖子了,发帖宣传虽然不能像佛系那样淡定,但也不能像跑火车那般急躁对待,自己内容不收录,完全是自己操作内容问题,可以参考一下别人的内容是怎么弄的,然后自己要试着转变,而且收录这个内容,常常会变化的,不是一种规则就吃到老

    搜房天下房聊软件哪一个好呢
    本帖最后由 发帖软件 于 2019-5-22 16:15 编辑 2搜房天下群发房聊信息软件,开始本来打算做58同城的,但发一个就要一次点触验证码,这就让人没有感觉到存在的价值了吧,都是卖二手房和新房的搜房天下倒是可以发即时聊天信息,也没有发现他这个网站有啥子限制,登陆一个搜房天下账号,然后采集回来分类列表的网址,然后就一

    大家坛有没有好用的群发工具下载呢
    当你的笑容给我礼貌的招呼,大家坛全自动发帖软件,宣传推广是一场持久战,总是有一些人把软件用了一天,或是几个小时,就觉得自己付出太多了,那加进来的粉丝,或是流量,应该是和宣传多少成正比的,其实没有这么便宜的事,就像很多阅读量超过一百万的视频,或是电影,真正会在屏幕打赏的人不会超过三千,真正大额打赏给主

    群发正版软件中国塑料网
    中国塑料网群发软件YYPOST脚本下载地址,这个网站会有一个很奇怪的问题就是你在首页登陆无半个验证码,但在登陆网址登陆就会有一个验证码,所以我们灵活一些,在首页登陆就不用输入验证码了哈。网站秒收录比较高,但发的都是五金和建筑行业,先前有很多人都是发土建工程的大公司操作的,现在这个网站专为那个行业诞生的吧。

    OpenStreetMap网站正版2019年发帖工具下载
    本帖最后由 发帖软件 于 2019-5-21 11:13 编辑 OpenStreetMap网站全自动群发,OpenStreetMapOpenStreetMap(简称OSM,中文是公开地图)是一个网上地图协作计划,目标是创造一个内容自由且能让所有人编辑的世界地图。有的人编辑地图然后等收录,有的人发日志等收录,我们这里也是利用地图日志做为宣传的目标,简单的脚本理

    搜房天下全自动收短信全自动识别验证码注册账号软件
    房天下自动注册机,这个脚本是前几天发房聊的脚本廷伸品种,这个脚本能做到自动注册账号,自动保存账号,自动发房聊的效果,不过今天我们主要说一说怎么注册账号写脚本吧,这个搜房天天下的账号,可以发提问,可以发房聊,发论坛,发博客,还有发个人中心页都是有秒收的效果的,这样就省去了去买号,去乱花钱的效果了吧,而

    企业邮箱安卓端有什么APP软件可以发的呢
    请输入标题企业邮箱安卓发发送邮箱脚本,这个脚本是利用企业邮箱进行群发的,全程是一种模拟手工操作的过程,所以封号是很少的,而且企业邮箱群发到普通QQ邮箱不容易进垃圾箱中的,所以这个脚本也是这样的原理,不过最好是利用一些多开器,登陆多点的QQ邮箱账号会比较流畅一些,然后用软件一个一个的切换APP进行群发邮件会

    头条留评论软件有没有好用的呢?
    今天整一个今日头条留言软件,对于留言YYPOST是优势是比较大的存在,因为他往往专注一些下拉定位的优点,像今日头条这样,还是需要一些特殊下拉定位的,因为他新闻有长有短,有图有视频的,所以综合起来定位是比较难的,如果用POST也不是很轻松可以破解他的加密参数。这个脚本也是有一个不好的地方就是换号会比较麻烦,您电

    单网页生成神器
    最近新技术,网页生成机占领了整个网络的半壁江山,效果很疯狂,虽然不知道能持续多久,作为开发软件的领头者,一直在找收录的方法,一直在努力创新着,一直被人模仿,却从没有被超越过,这个网页生成机,已经出来有一段时间了,一直没有拿出来分享,醉过醉过,它是利用的一些小小收录漏洞整的,您最好用一些老站域名,进行

关闭
快速回复 返回列表 返回顶部
本站自动发贴软件,是现在最流行的做脚本软件,这种发贴工具,不但发贴收录快,而且抢占好的先机,完全自由编辑,实现针对性群发模拟操作,软件可以顶贴,也可以发贴,可以兼容支持Discuz、PHPWind、Dvbbs三大主流论坛,有手机验证码收件,邮件收发的功能,支持验证码识别,注册问题识别,多线程任务,自动上传头像,自动激活注册邮件,兼容防注册插件,本站软件原创正版,更新效率最快的原创软件。 『网络推广软件』『自动发帖软件』『 自动发帖