   })
      .catch(() => {
        alert('环境检测失败');
      });

    // 安装目录按钮切换
    const folderButtons = document.querySelectorAll('#install-folder-tags button');
    const folderInput = document.getElementById('install_folder_hidden');
    
    // 默认选中第一个按钮
    if (folderButtons.length > 0) {
      folderButtons[0].classList.add('bg-primary', 'text-white', 'border-primary');
      folderInput.value = folderButtons[0].dataset.value;
    }
    
    folderButtons.