diff --git a/src/components/Layout/index.css b/src/components/Layout/index.css index 9be72e6..be47ae4 100644 --- a/src/components/Layout/index.css +++ b/src/components/Layout/index.css @@ -4,6 +4,13 @@ min-height: 100vh; width: 100%; background-color: #f2f3f5; + + .app-layout-skeleton { + flex: 1; + box-sizing: border-box; + padding: 100px; + background-color: aqua; + } } /* 主内容区域 */ .main-content { diff --git a/src/components/Layout/index.jsx b/src/components/Layout/index.jsx index e6adb1b..4b68264 100644 --- a/src/components/Layout/index.jsx +++ b/src/components/Layout/index.jsx @@ -1,4 +1,5 @@ import { useState, useEffect } from "react"; +import { Skeleton } from "@arco-design/web-react"; import Sidebar from "../Sidebar"; import "./index.css"; @@ -8,7 +9,9 @@ const Layout = ({ children }) => { return (
-
{children}
+ +
{children}
+
); }; diff --git a/src/pages/CompanyJobsPage/index.jsx b/src/pages/CompanyJobsPage/index.jsx index 96bf696..5b3e069 100644 --- a/src/pages/CompanyJobsPage/index.jsx +++ b/src/pages/CompanyJobsPage/index.jsx @@ -21,39 +21,41 @@ const CompanyJobsPage = () => { const fetchData = async () => { try { setLoading(true); - + // Get current user's student ID from API let studentId = null; try { const currentStudent = await studentAPI.getCurrentStudent(); studentId = currentStudent?.id; } catch (err) { - console.log('Could not get current student:', err); + console.log("Could not get current student:", err); } - + // Fetch jobs (and interviews if we have a student ID) - const jobsData = await jobAPI.getList({ - page: 1, - pageSize: 10, - isActive: true + const jobsData = await jobAPI.getList({ + page: 1, + pageSize: 10, + isActive: true, }); - + let interviewsData = { data: [] }; if (studentId) { try { - interviewsData = await interviewAPI.getList({ + interviewsData = await interviewAPI.getList({ studentId: studentId, - status: 'SCHEDULED' + status: "SCHEDULED", }); } catch (err) { - console.log('No interviews found or API error'); + console.log("No interviews found or API error"); } } - + // Map data to frontend format const mappedJobs = mapJobList(jobsData.data || jobsData); - const mappedInterviews = mapInterviewList(interviewsData.data || interviewsData); - + const mappedInterviews = mapInterviewList( + interviewsData.data || interviewsData + ); + setJobs(mappedJobs); setInterviews(mappedInterviews); } catch (error) { @@ -73,7 +75,10 @@ const CompanyJobsPage = () => { if (loading) { return (
-
+

加载中...

@@ -86,10 +91,7 @@ const CompanyJobsPage = () => {

企业内推岗位库

- +
@@ -102,43 +104,54 @@ const CompanyJobsPage = () => { >

内推岗位面试

- - )) : ( +
+ {item.interviewTime} +
+ {item.statusText} +
+
+ + )) + ) : (
  • -

    +

    暂无面试安排