| import React, { useState } from 'react'; |
| import Header from '../../components/Header'; |
| import './NewUserGuide.css'; |
| import NewbieTasks from './NewbieTasks.jsx'; |
| |
| const NewUserGuide = () => { |
| const [activeTab, setActiveTab] = useState('terms'); |
| |
| const renderContent = () => { |
| switch (activeTab) { |
| case 'terms': |
| return ( |
| <div className="guide-content"> |
| <h2>名词解释</h2> |
| <p>在echo Torrent中,我们使用以下术语:</p> |
| <ul> |
| <li><strong>Tracker:</strong> 监测用户流量的服务器。</li> |
| <li><strong>种子:</strong> 扩展名为.torrent的文件,主要包含文件信息、Tracker信息等。在本站发布的种子。每个用户下载都会下载包含特定信息的种子以便Tracker记录不同用户的流量情况。</li> |
| <li><strong>流量:</strong> 分为上传量(通过本站Tracker向其他用户上传的数据总量)和下载量(通过本站Tracker从其他用户下载的数据总量)。</li> |
| <li><strong>做种:</strong> 指上传资源供他人下载。</li> |
| <li><strong>分享率:</strong> 分享率=上传量/下载量</li> |
| <li><strong>经验值:</strong> 用于奖励活跃用户的虚拟积分。</li> |
| <li><strong>金币:</strong> 用于兑换虚拟物品的虚拟货币,可在个人中心充值。</li> |
| </ul> |
| </div> |
| ); |
| case 'tutorial': |
| return ( |
| <div className="guide-content"> |
| <h2>详细教程</h2> |
| <ol> |
| <li>注册并完善个人资料</li> |
| <li>浏览并下载感兴趣的种子资源</li> |
| <li>做种、评论、评分获得积分</li> |
| <li>发布你的第一个种子</li> |
| </ol> |
| </div> |
| ); |
| case 'tasks': |
| return ( |
| <div className="guide-content"> |
| <NewbieTasks /> |
| {/* ✅ 使用真实组件替换静态任务列表 */} |
| </div> |
| ); |
| default: |
| return null; |
| } |
| }; |
| |
| return ( |
| <div className="new-user-guide-page"> |
| <Header /> |
| <div className="guide-container"> |
| <div className="guide-nav"> |
| <button |
| className={activeTab === 'terms' ? 'active' : ''} |
| onClick={() => setActiveTab('terms')} |
| > |
| 名词解释 |
| </button> |
| <button |
| className={activeTab === 'tutorial' ? 'active' : ''} |
| onClick={() => setActiveTab('tutorial')} |
| > |
| 详细教程 |
| </button> |
| <button |
| className={activeTab === 'tasks' ? 'active' : ''} |
| onClick={() => setActiveTab('tasks')} |
| > |
| 用户等级 |
| </button> |
| </div> |
| <div className="guide-main"> |
| {renderContent()} |
| </div> |
| </div> |
| </div> |
| ); |
| }; |
| |
| export default NewUserGuide; |