新增种子收藏和种子促销,首页推荐显示

Change-Id: Ia8632b7909845230a0becf1616dc647e0c7e292b
diff --git a/front/src/AdminPage.js b/front/src/AdminPage.js
index dac05cb..f063c09 100644
--- a/front/src/AdminPage.js
+++ b/front/src/AdminPage.js
@@ -51,11 +51,6 @@
         }
     };
 
-    const handleConfigChange = (e) => {
-        const { name, value } = e.target;
-        setConfig({ ...config, [name]: value });
-    };
-
     const handleBan = (user) => {
         const adminId = getUserIdFromCookie();
         if (!adminId) {
@@ -97,28 +92,6 @@
             .catch((err) => console.error('解封用户失败:', err));
     };
 
-    // 保存系统参数到后端
-    const handleSave = () => {
-        const match = document.cookie.match('(^|;)\\s*userId=([^;]+)');
-        const userId = match ? match[2] : null;
-        if (!userId) {
-            alert('无法获取用户ID');
-            return;
-        }
-        fetch(`${API_BASE_URL}/api/save-config`, {
-            method: 'POST',
-            // credentials: 'include',
-            headers: { 'Content-Type': 'application/json' },
-            body: JSON.stringify({ userid: userId, ...config }),
-        })
-            .then((res) => {
-                if (!res.ok) throw new Error('Network response was not ok');
-                return res.json();
-            })
-            .then(() => alert('系统参数已保存'))
-            .catch((err) => console.error('保存系统参数失败:', err));
-    };
-
     // 初始化时向后端请求系统参数及用户列表
     useEffect(() => {
         const match = document.cookie.match('(^|;)\\s*userId=([^;]+)');
@@ -149,37 +122,10 @@
             {/* 参数设置 */}
             <div style={{ marginBottom: 32, padding: 18, background: "#f7faff", borderRadius: 12, display: "flex", gap: 24, alignItems: "center", justifyContent: "space-between" }}>
                 <b>系统参数:</b>
-                <label>
-                    FarmNumber:
-                    <input type="number" name="FarmNumber" value={config.FarmNumber} onChange={handleConfigChange} disabled style={{ width: 60, margin: "0 12px" }} />
-                </label>
-                <label>
-                    FakeTime:
-                    <input type="number" name="FakeTime" value={config.FakeTime} onChange={handleConfigChange} disabled style={{ width: 60, margin: "0 12px" }} />
-                </label>
-                <label>
-                    BegVote:
-                    <input type="number" name="BegVote" value={config.BegVote} onChange={handleConfigChange} disabled style={{ width: 60, margin: "0 12px" }} />
-                </label>
-                <label>
-                    CheatTime:
-                    <input type="number" name="CheatTime" value={config.CheatTime} onChange={handleConfigChange} disabled style={{ width: 60, margin: "0 12px" }} />
-                </label>
-                {/* <button
-                    onClick={handleSave}
-                    style={{
-                        background: '#1976d2',
-                        color: '#fff',
-                        border: 'none',
-                        borderRadius: 6,
-                        padding: '6px 18px',
-                        cursor: 'pointer',
-                        writingMode: 'horizontal-tb',
-                        whiteSpace: 'nowrap'
-                    }}
-                >
-                    保存
-                </button> */}
+                <span>FarmNumber: {config.FarmNumber}</span>
+                <span>FakeTime: {config.FakeTime}</span>
+                <span>BegVote: {config.BegVote}</span>
+                <span>CheatTime: {config.CheatTime}</span>
             </div>
             {/* 作弊用户 */}
             <div style={{ marginBottom: 32 }}>
@@ -201,7 +147,7 @@
                                 <td>{u.email}</td>
                                 <td>{u.username}</td>
                                 <td style={{ color: "#e53935" }}>
-                                    {"封禁" }
+                                    {"封禁"}
                                 </td>
                                 <td>
                                     <button
@@ -265,6 +211,12 @@
                 >
                     用户迁移
                 </button>
+                <button
+                    style={{ background: "#ff9800", color: "#fff", border: "none", borderRadius: 8, padding: "10px 28px", fontWeight: 600, fontSize: 16, cursor: "pointer" }}
+                    onClick={() => navigate("/seed-promotion")}
+                >
+                    促销管理
+                </button>
             </div>
         </div>
     );