| 
					
				 | 
			
			
				@@ -2,7 +2,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import React, { useState, useEffect, useCallback } from "react"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { useRouter } from "next/navigation"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { User, ChevronLeft, MessageSquare } from "lucide-react"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  User, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ChevronLeft, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  MessageSquare, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ArrowUpCircle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ArrowDownCircle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} from "lucide-react"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import Image from "next/image"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import InfiniteScroll from "react-infinite-scroll-component"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const PAGE_SIZE = 10; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -18,7 +25,7 @@ const PersonalCenter = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const [hasMorePredictions, setHasMorePredictions] = useState(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const [hasMorePoints, setHasMorePoints] = useState(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  const fetchData = useCallback(async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const fetchInitialData = useCallback(async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       setIsLoading(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const storedUser = JSON.parse( 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -26,52 +33,102 @@ const PersonalCenter = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       setUser(storedUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (storedUser && storedUser.username) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const predictionResponse = await fetch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          `/api/prediction?username=${encodeURIComponent( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            storedUser.username 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          )}¤t=${predictionPage}&pageSize=${PAGE_SIZE}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const predictionData = await predictionResponse.json(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (storedUser && storedUser.id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const [predictionResponse, pointResponse, userResponse] = 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          await Promise.all([ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fetch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              `/api/prediction?username=${encodeURIComponent( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                storedUser.username 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              )}¤t=1&pageSize=${PAGE_SIZE}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fetch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              `/api/point-history?userId=${encodeURIComponent( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                storedUser.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              )}¤t=1&pageSize=${PAGE_SIZE}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fetch(`/api/user?id=${encodeURIComponent(storedUser.id)}`), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const [predictionData, pointData, userData] = await Promise.all([ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          predictionResponse.json(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          pointResponse.json(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          userResponse.json(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (predictionData.success) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          setPredictions((prev) => [...prev, ...predictionData.data]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          setPredictions(predictionData.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           setHasMorePredictions(predictionData.data.length === PAGE_SIZE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           console.error("Failed to fetch predictions:", predictionData.error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const pointResponse = await fetch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          `/api/point-history?userId=${encodeURIComponent( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            storedUser.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          )}¤t=${pointPage}&pageSize=${PAGE_SIZE}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const pointData = await pointResponse.json(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (pointData.success) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          setPoints((prev) => [...prev, ...pointData.data]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          setPoints(pointData.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           setHasMorePoints(pointData.data.length === PAGE_SIZE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           console.error("Failed to fetch point history:", pointData.error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (userData.success && userData.data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // 更新用户信息,特别是积分 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const updatedUser = { ...storedUser, points: userData.data.points }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          setUser(updatedUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          localStorage.setItem("currentUser", JSON.stringify(updatedUser)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.error("Failed to fetch user data:", userData.error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.error("Error fetching data:", error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } finally { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       setIsLoading(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  }, [predictionPage, pointPage]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, []); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   useEffect(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    fetchData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  }, [fetchData]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    fetchInitialData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, [fetchInitialData]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  const loadMorePredictions = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    setPredictionPage((prevPage) => prevPage + 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const loadMorePredictions = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!hasMorePredictions || !user) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const response = await fetch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        `/api/prediction?username=${encodeURIComponent( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          user.username 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        )}¤t=${predictionPage + 1}&pageSize=${PAGE_SIZE}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const data = await response.json(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (data.success) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        setPredictions((prev) => [...prev, ...data.data]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        setPredictionPage((prev) => prev + 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        setHasMorePredictions(data.data.length === PAGE_SIZE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.error("Failed to fetch more predictions:", data.error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.error("Error fetching more predictions:", error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  const loadMorePoints = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    setPointPage((prevPage) => prevPage + 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const loadMorePoints = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!hasMorePoints || !user) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const response = await fetch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        `/api/point-history?userId=${encodeURIComponent(user.id)}¤t=${ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          pointPage + 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }&pageSize=${PAGE_SIZE}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const data = await response.json(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (data.success) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        setPoints((prev) => [...prev, ...data.data]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        setPointPage((prev) => prev + 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        setHasMorePoints(data.data.length === PAGE_SIZE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.error("Failed to fetch more point history:", data.error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.error("Error fetching more point history:", error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (isLoading) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -91,13 +148,24 @@ const PersonalCenter = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   return ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div className="bg-blue-600 text-white min-h-screen p-6"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div className="flex items-center mb-6"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <ChevronLeft className="cursor-pointer" onClick={() => router.back()} /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <ChevronLeft 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          className="cursor-pointer" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          onClick={() => router.back()} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          size={32} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <h1 className="text-2xl font-bold ml-4">个人中心</h1> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div className="bg-white text-black rounded-lg p-4 mb-6"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div className="flex items-center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <User className="w-12 h-12 text-blue-600 mr-4" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {/* <User className="w-12 h-12 text-blue-600 mr-4" /> */} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <Image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            src="/images/cluo.webp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            alt="User Avatar" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            width={50} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            height={50} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            className="rounded-full mr-2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <h2 className="text-xl font-bold">{user.username}</h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <p className="text-gray-600">积分: {user.points}</p> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -106,42 +174,90 @@ const PersonalCenter = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div className="bg-white text-black rounded-lg p-4 mb-6"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <h3 className="text-lg font-bold mb-2">预测记录</h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          id="predictionScroll" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          style={{ height: "300px", overflow: "auto" }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <h3 className="text-xl font-bold mb-2 text-blue-600">预测记录</h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div id="predictionScroll" className="h-[300px] overflow-auto"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <InfiniteScroll 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dataLength={predictions.length} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             next={loadMorePredictions} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             hasMore={hasMorePredictions} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            loader={<h4>Loading...</h4>} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            endMessage={<p className="text-center">没有更多记录了</p>} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            loader={<h4 className="text-center text-gray-500">加载中...</h4>} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            endMessage={ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <p className="text-center text-gray-500">没有更多记录了</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             scrollableTarget="predictionScroll" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             {predictions.map((prediction) => ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <div key={prediction.id} className="mb-2 p-2 border-b"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <p className="font-bold">{prediction.matchInfo}</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <p>比赛时间: {prediction.matchTime}</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  胜负预测:{" "} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  {prediction.whoWillWin === "home" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ? "主胜" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    : prediction.whoWillWin === "away" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ? "客胜" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    : "平局"} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                key={prediction.id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                className="mb-2 border-b border-gray-200 hover:bg-gray-50 transition duration-150 ease-in-out" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <p className="font-bold text-lg text-blue-700 mb-2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  {prediction.matchInfo} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <p className=" text-gray-600 mb-2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  比赛时间:{" "} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span className="font-medium text-black"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    {prediction.matchTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <p className="mb-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  胜负预测: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    className={`font-medium ${ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      prediction.whoWillWin === "home" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ? "text-red-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        : prediction.whoWillWin === "away" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ? "text-green-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        : "text-yellow-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }`} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    {prediction.whoWillWin === "home" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      ? "主胜" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      : prediction.whoWillWin === "away" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      ? "客胜" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      : "平局"} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <p className="mb-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  首先得分: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    className={`font-medium ${ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      prediction.firstTeamToScore === "home" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ? "text-red-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        : prediction.firstTeamToScore === "away" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ? "text-green-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        : "text-gray-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }`} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    {prediction.firstTeamToScore === "home" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      ? "主队" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      : prediction.firstTeamToScore === "away" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      ? "客队" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      : "无进球"} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <p className="mb-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  总进球数预测:{" "} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span className="font-medium text-purple-600"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    {prediction.totalGoals} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <p className="mb-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  获得积分:{" "} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span className="font-medium text-orange-600"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    {prediction.pointsEarned} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  首先得分:{" "} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  {prediction.firstTeamToScore === "home" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ? "主队" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    : prediction.firstTeamToScore === "away" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ? "客队" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    : "无进球"} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  预测结果: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    className={`font-medium ${ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      prediction.isCorrect ? "text-green-600" : "text-red-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }`} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    {prediction.isCorrect ? "正确" : "错误"} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <p>总进球数预测: {prediction.totalGoals}</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <p>获得积分: {prediction.pointsEarned}</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <p>预测结果: {prediction.isCorrect ? "正确" : "错误"}</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ))} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </InfiniteScroll> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -149,7 +265,7 @@ const PersonalCenter = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div className="bg-white text-black rounded-lg p-4 mb-6"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <h3 className="text-lg font-bold mb-2">积分记录</h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <h3 className="text-lg font-bold mb-2 text-blue-700">积分记录</h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div id="pointScroll" style={{ height: "300px", overflow: "auto" }}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <InfiniteScroll 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dataLength={points.length} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -160,11 +276,28 @@ const PersonalCenter = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             scrollableTarget="pointScroll" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             {points.map((point) => ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <div key={point.id} className="mb-2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  {new Date(point.createdAt).toLocaleDateString()}:{" "} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  {point.reason} - {point.points}分 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div key={point.id} className="mb-3 flex items-start"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div className="mr-3 mt-1 flex-shrink-0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  {point.points > 0 ? ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <ArrowUpCircle className="text-green-500 w-5 h-5" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  ) : ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <ArrowDownCircle className="text-red-500 w-5 h-5" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  )} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div className="flex-grow mr-4"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <p className="text-sm text-gray-600"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    {new Date(point.createdAt).toLocaleDateString()} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <p className="font-medium">{point.reason}</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  className={`flex-shrink-0 font-bold ${ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    point.points > 0 ? "text-green-600" : "text-red-600" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  }`} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  {point.points > 0 ? "+" : ""} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  {point.points} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ))} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </InfiniteScroll> 
			 |