Răsfoiți Sursa

创建股票训练系统首页 pages_stock_home.tsx

yourname 6 luni în urmă
părinte
comite
f76d3c4e76
3 a modificat fișierele cu 36 adăugiri și 11 ștergeri
  1. 4 3
      client/mobile/mobile_app.tsx
  2. 32 0
      client/mobile/pages_stock_home.tsx
  3. 0 8
      server/app.tsx

+ 4 - 3
client/mobile/mobile_app.tsx

@@ -31,6 +31,7 @@ import ExamCard from './components/Exam/ExamCard.tsx';
 import ProfilePage from './pages_profile.tsx'
 import SettingsPage from './pages_settings.tsx'
 import { XunlianPage } from "./pages_xunlian.tsx";
+import StockHomePage from "./pages_stock_home.tsx";
 
 
 // 设置中文语言
@@ -236,7 +237,7 @@ const MobileLayout = () => {
             <BellIcon className="w-6 h-6 mb-1" />
             <span className="text-xs">通知</span>
           </Link>
-          <Link
+          {/* <Link
             to="/mobile/classroom"
             className={`flex flex-col items-center py-2 px-4 ${
               location.pathname.startsWith('/mobile/classroom') ? 'text-blue-600' : 'text-gray-500'
@@ -253,7 +254,7 @@ const MobileLayout = () => {
           >
             <AcademicCapIcon className="w-6 h-6 mb-1" />
             <span className="text-xs">答题</span>
-          </Link>
+          </Link> */}
           <Link
             to="/mobile/profile"
             className={`flex flex-col items-center py-2 px-4 ${
@@ -349,7 +350,7 @@ const App = () => {
       children: [
         {
           index: true,
-          element: <HomePage />
+          element: <StockHomePage />
         },
         {
           path: 'profile',

+ 32 - 0
client/mobile/pages_stock_home.tsx

@@ -0,0 +1,32 @@
+import React from "react";
+import { Link } from "react-router";
+
+export default function StockHomePage() {
+  return (
+    <div className="min-h-screen bg-gray-50 p-4 md:p-8">
+      <h1 className="text-3xl font-bold text-center text-gray-800 mb-8 md:mb-12">
+        股票训练系统
+      </h1>
+      <div className="flex flex-col gap-4 max-w-md mx-auto">
+        <Link
+          to="/mobile/classroom"
+          className="bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-6 rounded-lg shadow-md transition-colors duration-200 text-center"
+        >
+          课堂训练
+        </Link>
+        <Link
+          to="/mobile/exam"
+          className="bg-green-600 hover:bg-green-700 text-white font-medium py-3 px-6 rounded-lg shadow-md transition-colors duration-200 text-center"
+        >
+          考试模式
+        </Link>
+        <Link
+          to="/mobile/xunlian"
+          className="bg-purple-600 hover:bg-purple-700 text-white font-medium py-3 px-6 rounded-lg shadow-md transition-colors duration-200 text-center"
+        >
+          训练模式
+        </Link>
+      </div>
+    </div>
+  );
+}

+ 0 - 8
server/app.tsx

@@ -119,14 +119,6 @@ export default function({ apiClient, app, moduleDir , auth}: ModuleParams) {
                 >
                   数据库迁移
                 </a>
-
-                {/* 股票训练入口按钮 */}
-                <a
-                  href="/mobile/xunlian" 
-                  className="w-full flex justify-center py-3 px-4 border border-blue-600 rounded-md shadow-sm text-lg font-medium text-blue-600 bg-white hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
-                >
-                  进入股票训练
-                </a>
                 
               </div>
             </div>