This commit is contained in:
quantulr
2023-11-01 17:27:06 +08:00
parent 7e465da9d2
commit 1a22404f19
87 changed files with 1604 additions and 196 deletions

2
.env.production.local Normal file
View File

@ -0,0 +1,2 @@
NEXT_PUBLIC_ADMIN_BASE_URL=/admin-api
NEXT_PUBLIC_FRONT_BASE_URL=/front-api

2
.gitignore vendored
View File

@ -26,7 +26,7 @@ yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
.env.development.local
# vercel
.vercel

View File

@ -0,0 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
const Layout = ({
children,
}: {
children: ReactNode;
params: {
articleId: string;
};
}) => {
return (
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,23 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import ArticleRender from "@/app/components/ArticleRender";
import { articleDetail } from "@/app/api/articles";
const Page = async ({
params,
}: {
params: {
articleId: string;
};
}) => {
const { articleId } = params;
const data = await articleDetail({ id: articleId });
return (
<>
<ArticleWithBreadcrumb breadcrumb={[]}>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
</>
);
};
export default Page;

View File

@ -0,0 +1,6 @@
export const navigations = [
{
title: "学术活动",
href: "/academic-exchange/academic-events/pages/1",
},
];

View File

@ -0,0 +1,28 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { navigations } from "@/app/(articles)/academic-exchange/academic-events/pages/[pageIndex]/config";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "学术交流",
href: "/academic-exchange/academic-events/pages/1",
},
{
title: "学术活动",
href: "/academic-exchange/academic-events/pages/1",
},
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout navigations={navigations} leftNavTitle={"学术交流"}>
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,18 @@
import ArticleList from "@/app/components/ArticleList";
const Page = ({
params,
}: {
params: {
pageIndex: string;
};
}) => {
const { pageIndex } = params;
return (
<>
<ArticleList title={"学术活动"} cid={"6"} pageNo={parseInt(pageIndex)} />
</>
);
};
export default Page;

View File

@ -1,6 +1,5 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
import Breadcrumb from "@/app/components/Breadcrumb";
const Layout = ({
children,
@ -12,10 +11,7 @@ const Layout = ({
}) => {
return (
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
<div className={"flex flex-col h-full"}>
<Breadcrumb navigations={[]} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
</div>
{children}
</ArticleLayout>
);
};

View File

@ -1,5 +1,6 @@
import { articleDetail } from "@/app/api/articles";
import ArticleContent from "@/app/components/ArticleContent";
import ArticleRender from "@/app/components/ArticleRender";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
export default async function Article({
params,
@ -9,5 +10,15 @@ export default async function Article({
};
}) {
const data = await articleDetail({ id: params.articleId });
return <ArticleContent article={data} />;
return (
<ArticleWithBreadcrumb
breadcrumb={[
{ title: "首页", href: "/" },
{ title: "公告通知", href: "/announcements/pages/1" },
{ title: data.title, href: `/announcements/${data.id}` },
]}
>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
);
}

View File

@ -1,19 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
import Breadcrumb from "@/app/components/Breadcrumb";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{ title: "公告通知", href: "/announcements/pages/1" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout navigations={[]} leftNavTitle={"公告通知"}>
<div className={"flex flex-col h-full"}>
<Breadcrumb
navigations={[
{ title: "首页", href: "/" },
{ title: "公告通知", href: "/announcements/pages/1" },
]}
/>
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
</div>
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
</ArticleLayout>
);
};

View File

@ -1,8 +1,4 @@
import { listArticles } from "@/app/api/articles";
import { Fragment } from "react";
import styles from "./styles.module.scss";
import Link from "next/link";
import Pagination from "@/app/components/Pagination";
import ArticleList from "@/app/components/ArticleList";
const Page = async ({
params,
@ -11,31 +7,10 @@ const Page = async ({
pageIndex: string;
};
}) => {
const data = await listArticles({
cid: "3",
pageNo: params.pageIndex,
pageSize: 20,
});
const { pageIndex } = params;
return (
<div>
<h2 className={"text-[#0f6fca] text-sm"}></h2>
<ul className={`${styles.articles} mt-5`}>
{data.lists.map((article, index) => (
<li className={`${styles.article}`} key={article.id}>
<Link
className={"flex h-8 text-sm text-[#666666] items-center"}
href={`/announcements/${article.id}`}
>
{article.title}
</Link>
</li>
))}
</ul>
<Pagination
page={parseInt(params.pageIndex)}
total={data.count}
perPage={20}
/>
<ArticleList title={"公告通知"} cid={"3"} pageNo={parseInt(pageIndex)} />
</div>
);
};

View File

@ -0,0 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
const Layout = ({
children,
}: {
children: ReactNode;
params: {
articleId: string;
};
}) => {
return (
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,24 @@
import { articleDetail } from "@/app/api/articles";
import ArticleRender from "@/app/components/ArticleRender";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
export default async function Article({
params,
}: {
params: {
articleId: string;
};
}) {
const data = await articleDetail({ id: params.articleId });
return (
<ArticleWithBreadcrumb
breadcrumb={[
{ title: "首页", href: "/" },
{ title: "综合新闻", href: "/general-news/pages/1" },
{ title: data.title, href: `/general-news/${data.id}` },
]}
>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
);
}

View File

@ -0,0 +1,21 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{ title: "综合新闻", href: "/general-news/pages/1" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout navigations={[]} leftNavTitle={"综合新闻"}>
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,23 @@
import React from "react";
import ArticleList from "@/app/components/ArticleList";
const Page = ({
params,
}: {
params: {
pageIndex: string;
};
}) => {
const { pageIndex } = params;
return (
<>
<ArticleList
title={"综合新闻"}
cid={"4"}
pageNo={parseInt(pageIndex)}
></ArticleList>
</>
);
};
export default Page;

View File

@ -0,0 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
const Layout = ({
children,
}: {
children: ReactNode;
params: {
articleId: string;
};
}) => {
return (
<ArticleLayout leftNavTitle={"研究院招聘"} navigations={[]}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,24 @@
import { articleDetail } from "@/app/api/articles";
import ArticleRender from "@/app/components/ArticleRender";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
export default async function Article({
params,
}: {
params: {
articleId: string;
};
}) {
const data = await articleDetail({ id: params.articleId });
return (
<ArticleWithBreadcrumb
breadcrumb={[
{ title: "首页", href: "/" },
{ title: "研究院招聘", href: "/recruitment/pages/1" },
{ title: data.title, href: `/recruitment/${data.id}` },
]}
>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
);
}

View File

@ -0,0 +1,20 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{ title: "研究院招聘", href: "/recruitment/pages/1" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout navigations={[]} leftNavTitle={"研究院招聘"}>
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,22 @@
import ArticleList from "@/app/components/ArticleList";
const Page = ({
params,
}: {
params: {
pageIndex: string;
};
}) => {
const { pageIndex } = params;
return (
<>
<ArticleList
title={"研究院招聘"}
cid={"12"}
pageNo={parseInt(pageIndex)}
/>
</>
);
};
export default Page;

View File

@ -0,0 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
const Layout = ({
children,
}: {
children: ReactNode;
params: {
articleId: string;
};
}) => {
return (
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -1,7 +1,24 @@
import React from "react";
import { articleDetail } from "@/app/api/articles";
import ArticleRender from "@/app/components/ArticleRender";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
const ResearchProgress = () => {
return <div></div>;
};
export default ResearchProgress;
export default async function ResearchProgress({
params,
}: {
params: {
articleId: string;
};
}) {
const data = await articleDetail({ id: params.articleId });
return (
<ArticleWithBreadcrumb
breadcrumb={[
{ title: "首页", href: "/" },
{ title: "科研进展", href: "/general-news/pages/1" },
{ title: data.title, href: `/general-news/${data.id}` },
]}
>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
);
}

View File

@ -0,0 +1,20 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{ title: "科研进展", href: "/research-progress/pages/1" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout navigations={[]} leftNavTitle={"科研进展"}>
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,18 @@
import ArticleList from "@/app/components/ArticleList";
const Page = ({
params,
}: {
params: {
pageIndex: string;
};
}) => {
const { pageIndex } = params;
return (
<>
<ArticleList title={"科研进展"} cid={"9"} pageNo={parseInt(pageIndex)} />
</>
);
};
export default Page;

View File

@ -0,0 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
const Layout = ({
children,
}: {
children: ReactNode;
params: {
articleId: string;
};
}) => {
return (
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,24 @@
import { articleDetail } from "@/app/api/articles";
import ArticleRender from "@/app/components/ArticleRender";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
export default async function Page({
params,
}: {
params: {
articleId: string;
};
}) {
const data = await articleDetail({ id: params.articleId });
return (
<ArticleWithBreadcrumb
breadcrumb={[
{ title: "首页", href: "/" },
{ title: "科技成果", href: "/general-news/pages/1" },
{ title: data.title, href: `/general-news/${data.id}` },
]}
>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
);
}

View File

@ -0,0 +1,20 @@
import ArticleLayout from "@/app/components/ArticleLayout";
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
import { ReactNode } from "react";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{ title: "科技成果", href: "/technological-achievements/pages/1" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout navigations={[]} leftNavTitle={"科研进展"}>
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,18 @@
import ArticleList from "@/app/components/ArticleList";
const Page = ({
params,
}: {
params: {
pageIndex: string;
};
}) => {
const { pageIndex } = params;
return (
<>
<ArticleList title={"科技成果"} cid={"7"} pageNo={parseInt(pageIndex)} />
</>
);
};
export default Page;

View File

@ -0,0 +1,24 @@
export const navigations = [
{ title: "政府政策", href: "/achievements-transformation/government-policy" },
{
title: "投融资",
href: "/achievements-transformation/investment-and-financing",
},
{ title: "产业对接", href: "/achievements-transformation/industry-docking" },
{
title: "科技评估",
href: "/achievements-transformation/technology-assessment",
},
{
title: "情报服务",
href: "/achievements-transformation/intelligence-services",
},
{
title: "科研项目申报",
href: "/achievements-transformation/scientific-research-project-declaration",
},
{
title: "知识产权服务",
href: "/achievements-transformation/intellectual-property-services",
},
];

View File

@ -0,0 +1,21 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { ReactNode } from "react";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
},
{ title: "政府政策", href: "/achievements-transformation/government-policy" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
);
};
export default Layout;

View File

@ -0,0 +1,19 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<ArticleHeading text={"政府政策"} />
<ol className={"list-decimal list-inside indent-8"}>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
</>
);
};
export default Page;

View File

@ -0,0 +1,21 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { ReactNode } from "react";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
},
{ title: "产业对接", href: "/achievements-transformation/industry-docking" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
);
};
export default Layout;

View File

@ -0,0 +1,19 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<ArticleHeading text={"产业对接"} />
<ol className={"list-decimal list-inside indent-8"}>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
</>
);
};
export default Page;

View File

@ -0,0 +1,24 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { ReactNode } from "react";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
},
{
title: "知识产权服务",
href: "/achievements-transformation/scientific-research-project-declaration",
},
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
);
};
export default Layout;

View File

@ -0,0 +1,22 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<ArticleHeading text={"知识产权服务"} />
<p className={"text-base indent-8 my-1 text-center"}>
</p>
<ol className={"list-decimal list-inside indent-8 text-center"}>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
</>
);
};
export default Page;

View File

@ -0,0 +1,24 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { ReactNode } from "react";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
},
{
title: "情报服务",
href: "/achievements-transformation/intelligence-services",
},
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
);
};
export default Layout;

View File

@ -0,0 +1,26 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<ArticleHeading text={"情报服务"} />
<ol className={"list-decimal list-inside indent-8"}>
<li>
</li>
<li>
沿
</li>
<li>
</li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
</>
);
};
export default Page;

View File

@ -0,0 +1,24 @@
import React, { ReactNode } from "react";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
},
{
title: "投融资",
href: "/achievements-transformation/investment-and-financing",
},
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
);
};
export default Layout;

View File

@ -0,0 +1,18 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<ArticleHeading text={"投融资"} />
<ol className={"list-decimal list-inside indent-8"}>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
</>
);
};
export default Page;

View File

@ -0,0 +1,13 @@
import ArticleLayout from "@/app/components/ArticleLayout";
import { ReactNode } from "react";
import { navigations } from "@/app/(introduce)/achievements-transformation/config";
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout leftNavTitle={"成果转化服务"} navigations={navigations}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,24 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { ReactNode } from "react";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
},
{
title: "科研项目申报",
href: "/achievements-transformation/scientific-research-project-declaration",
},
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
);
};
export default Layout;

View File

@ -0,0 +1,23 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<ArticleHeading text={"科研项目申报"} />
<ol className={"list-decimal list-inside indent-8"}>
<li></li>
<li></li>
<li>
</li>
<li>
绿
</li>
<li></li>
<li></li>
</ol>
</>
);
};
export default Page;

View File

@ -0,0 +1,24 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { ReactNode } from "react";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
},
{
title: "科技评估",
href: "/achievements-transformation/technology-assessment",
},
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
);
};
export default Layout;

View File

@ -0,0 +1,17 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<ArticleHeading text={"科技评估"} />
<ol className={"list-decimal list-inside indent-8"}>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
</>
);
};
export default Page;

View File

@ -0,0 +1,20 @@
import ArticleLayout from "@/app/components/ArticleLayout";
import React, { ReactNode } from "react";
import Breadcrumb from "@/app/components/Breadcrumb";
const breadcrumb = [
{ href: "/", title: "首页" },
{ href: "/contact-us", title: "联系我们" },
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout leftNavTitle={"联系我们"}>
<div className={"flex flex-col h-full"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
</div>
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,24 @@
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786] mb-8"}>
</h2>
<p className={"text-base indent-8 my-1"}>
绿
</p>
<p className={"text-base indent-8 my-1"}>
8:3018:00
</p>
<p className={"text-base indent-8 my-1"}>
18156053255 18156054143
</p>
<p className={"text-base indent-8 my-1"}>
D1 7
</p>
<p className={"text-base indent-8 my-1"}>230022</p>
</>
);
};
export default Page;

View File

@ -1,10 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"资产财务处"} />
<p className={"text-base indent-8 my-1"}>
<ol className={"list-decimal list-inside"}>
<li>

View File

@ -1,12 +1,10 @@
import React from "react";
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"综合办公室"} />
<p className={"text-base indent-8 my-1"}>
<ol className={"list-decimal list-inside"}>
<li>
@ -34,7 +32,7 @@ const Page = () => {
<li></li>
</ol>
</p>
<p className={"text-base indent-8 mt-8"}>
<p className={"text-base indent-8 my-1"}>
</p>
</>

View File

@ -1,8 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}></h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"产业处"} />
<p className={"text-base indent-8 my-1"}>
<ol className={"list-decimal list-inside"}>
<li></li>

View File

@ -1,8 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}></h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"人事处"} />
<p className={"text-base indent-8 my-1"}>
<ol className={"list-decimal list-inside"}>
<li></li>

View File

@ -1,8 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}></h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"科技处"} />
<p className={"text-base indent-8 my-1"}>
</p>
<ol className={"list-decimal list-inside indent-8"}>

View File

@ -1,12 +1,12 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<ArticleHeading text={"组织架构"} />
<img
className={"w-full mt-8"}
src={`${process.env.NEXT_ADMIN_BASE_URL}/uploads/image/20231030/5c0b98dc-cf76-49c3-a510-f2f197f7dd09.jpeg`}
className={"w-full"}
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}/uploads/image/20231030/5c0b98dc-cf76-49c3-a510-f2f197f7dd09.jpeg`}
/>
</>
);

View File

@ -0,0 +1,10 @@
export const navigations = [
{ title: "机构简介", href: "/organization/overview" },
{ title: "院长致辞", href: "/organization/dean-speech" },
{ title: "科技产业发展委员会", href: "/organization/stidc" },
{ title: "组织架构", href: "/organization/architecture" },
{ title: "职能部门", href: "/organization/func-dep/general-office" },
{ title: "研究中心联合实验室", href: "/organization/joint-laboratory" },
{ title: "合作企业", href: "/organization/joint-venture" },
{ title: "科研平台", href: "/organization/research-platform" },
];

View File

@ -1,20 +1,20 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"院长致辞"} />
<p className={"text-base indent-8 my-1"}>
</p>
<p className={"text-base indent-8 mt-8"}>
<p className={"text-base indent-8 my-1"}>
绿绿
</p>
<p className={"text-base indent-8 mt-8"}>
<p className={"text-base indent-8 my-1"}>
5G物联网等领域进行科技布局绿沿
</p>
<p className={"text-base indent-8 mt-8"}>
<p className={"text-base indent-8 my-1"}>
</p>
</>

View File

@ -1,10 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>...</p>
<ArticleHeading text={"研究中心"} />
<p className={"text-base indent-8 my-1"}>...</p>
</>
);
};

View File

@ -1,10 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>...</p>
<ArticleHeading text={"合作企业"} />
<p className={"text-base indent-8 my-1"}>...</p>
</>
);
};

View File

@ -1,16 +1,6 @@
import ArticleLayout from "@/app/components/ArticleLayout";
import { ReactNode } from "react";
const navigations = [
{ title: "机构简介", href: "/organization/overview" },
{ title: "院长致辞", href: "/organization/dean-speech" },
{ title: "科技产业发展委员会", href: "/organization/stidc" },
{ title: "组织架构", href: "/organization/architecture" },
{ title: "职能部门", href: "/organization/func-dep/general-office" },
{ title: "研究中心联合实验室", href: "/organization/joint-laboratory" },
{ title: "合作企业", href: "/organization/joint-venture" },
{ title: "科研平台", href: "/organization/research-platform" },
];
import { navigations } from "@/app/(introduce)/organization/(generally)/config";
const Layout = ({ children }: { children: ReactNode }) => {
return (

View File

@ -1,16 +1,16 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
绿
</h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"中国科学院重庆绿色智能技术研究院合肥分院"} />
<p className={"text-base indent-8 my-1"}>
绿绿201822020181220
</p>
<p className={"text-base indent-8 mt-8"}>
<p className={"text-base indent-8 my-1"}>
5G物联绿绿
</p>
<p className={"text-base indent-8 mt-8"}>
<p className={"text-base indent-8 my-1"}>
</p>
</>

View File

@ -1,10 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>...</p>
<ArticleHeading text={"科研平台"} />
<p className={"text-base indent-8 my-1"}>...</p>
</>
);
};

View File

@ -1,10 +1,10 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>...</p>
<ArticleHeading text={"科技产业发展委员会"} />
<p className={"text-base indent-8 my-1"}>...</p>
</>
);
};

View File

@ -1,16 +1,14 @@
import Image from "next/image";
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
{" "}
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base mt-8 text-center"}></p>
<ArticleHeading text={"两院院士"} />
<p className={"text-base text-center"}></p>
<p className={"flex justify-center mt-2"}>
<img
src={`${process.env.NEXT_ADMIN_BASE_URL}/uploads/image/20231030/8d05e613-e2c6-47d1-81a9-08bd70b8ba73.jpeg`}
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}/uploads/image/20231030/8d05e613-e2c6-47d1-81a9-08bd70b8ba73.jpeg`}
alt={"张景中"}
/>
</p>

View File

@ -0,0 +1,6 @@
export const navigations = [
{ title: "人才概览", href: "/talents/overview" },
{ title: "两院院士", href: "/talents/academician" },
{ title: "研究员", href: "/talents/researcher" },
{ title: "副研究员", href: "/talents/vice-researcher" },
];

View File

@ -1,12 +1,6 @@
import ArticleLayout from "@/app/components/ArticleLayout";
import { ReactNode } from "react";
const navigations = [
{ title: "人才概览", href: "/talents/overview" },
{ title: "两院院士", href: "/talents/academician" },
{ title: "研究员", href: "/talents/researcher" },
{ title: "副研究员", href: "/talents/vice-researcher" },
];
import { navigations } from "@/app/(introduce)/talents/config";
const Layout = ({ children }: { children: ReactNode }) => {
return (

View File

@ -1,10 +1,11 @@
import ArticleHeading from "@/app/components/ArticleHeading";
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 mt-8"}>
<ArticleHeading text={"人才概况"} />
<p className={"text-base indent-8 my-1"}>
20171033340611362120171025381173973
5
</p>

View File

@ -1,5 +1,6 @@
import styles from "./page.module.scss";
import Link from "next/link";
import ArticleHeading from "@/app/components/ArticleHeading";
const academicians = [
{
@ -49,16 +50,16 @@ const academicians = [
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}></h2>
<div className={`${styles.academicians} flex flex-wrap mt-8`}>
<ArticleHeading text={"研究员"} />
<div className={`${styles.academicians} flex flex-wrap`}>
{academicians.map((academician) => (
<div
key={academician.name}
className={`${styles.academician} flex flex-col items-center w-1/5 mt-4`}
className={`${styles.academician} flex flex-col items-center w-1/5 mb-4`}
>
<img
className={"h-[138px]"}
src={`${process.env.NEXT_ADMIN_BASE_URL}${academician.picture}`}
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}${academician.picture}`}
/>
<Link href={academician.link}>{academician.name}</Link>
</div>

View File

@ -1,4 +1,5 @@
import Link from "next/link";
import ArticleHeading from "@/app/components/ArticleHeading";
const academicians = [
{
@ -18,8 +19,8 @@ const academicians = [
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786]"}></h2>
<div className={`flex mt-8 justify-around`}>
<ArticleHeading text={"副研究员"} />
<div className={`flex justify-around`}>
{academicians.map((academician) => (
<div
key={academician.name}
@ -27,7 +28,7 @@ const Page = () => {
>
<img
className={"h-[138px]"}
src={`${process.env.NEXT_ADMIN_BASE_URL}${academician.picture}`}
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}${academician.picture}`}
/>
<Link href={academician.link}>{academician.name}</Link>
</div>

BIN
app/assets/pin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,171 @@
"use client";
import React, { useEffect, useState } from "react";
import { register } from "swiper/element/bundle";
import axios from "axios";
import request from "@/app/lib/request";
import { BaseResponse, PageData } from "@/app/types/base";
import { Album } from "@/app/types/album";
register();
const albums = [
{
id: 28,
cid: 3,
name: "ah9.jpeg",
path: "/uploads/image/20231101/99c2f8c3-aba8-4872-a9b9-dfbcf128c062.jpeg",
uri: "http://localhost:8082/api/uploads/image/20231101/99c2f8c3-aba8-4872-a9b9-dfbcf128c062.jpeg",
ext: "jpeg",
size: "40KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 27,
cid: 3,
name: "ah7.jpeg",
path: "/uploads/image/20231101/aba2a38f-ee62-4730-af7a-5b8933ed7497.jpeg",
uri: "http://localhost:8082/api/uploads/image/20231101/aba2a38f-ee62-4730-af7a-5b8933ed7497.jpeg",
ext: "jpeg",
size: "4KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 26,
cid: 3,
name: "ah8.jpeg",
path: "/uploads/image/20231101/63523f59-9b59-40d1-a654-c4678f8a1913.jpeg",
uri: `http://localhost:8082/api/uploads/image/20231101/63523f59-9b59-40d1-a654-c4678f8a1913.jpeg`,
ext: "jpeg",
size: "29KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 25,
cid: 3,
name: "ah2.jpeg",
path: "/uploads/image/20231101/5bedf085-841a-48cc-bca2-9c9b2c751b48.jpeg",
uri: `http://localhost:8082/api/uploads/image/20231101/5bedf085-841a-48cc-bca2-9c9b2c751b48.jpeg`,
ext: "jpeg",
size: "26KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 24,
cid: 3,
name: "ah5.jpeg",
path: "/uploads/image/20231101/2f19a501-89f7-4f78-9487-096a3799736d.jpeg",
uri: "http://localhost:8082/api/uploads/image/20231101/2f19a501-89f7-4f78-9487-096a3799736d.jpeg",
ext: "jpeg",
size: "22KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 23,
cid: 3,
name: "ah6.jpeg",
path: "/uploads/image/20231101/70f4bea2-77a4-4595-a3a5-5c60711afae6.jpeg",
uri: "http://localhost:8082/api/uploads/image/20231101/70f4bea2-77a4-4595-a3a5-5c60711afae6.jpeg",
ext: "jpeg",
size: "22KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 22,
cid: 3,
name: "ah3.jpeg",
path: "/uploads/image/20231101/82309b4a-22e8-4b06-8e9d-d2b114ef3aad.jpeg",
uri: "http://localhost:8082/api/uploads/image/20231101/82309b4a-22e8-4b06-8e9d-d2b114ef3aad.jpeg",
ext: "jpeg",
size: "14KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 21,
cid: 3,
name: "ah1.jpeg",
path: "/uploads/image/20231101/5e3a02dc-2c7c-4671-9151-79315a53a3d2.jpeg",
uri: "http://localhost:8082/api/uploads/image/20231101/5e3a02dc-2c7c-4671-9151-79315a53a3d2.jpeg",
ext: "jpeg",
size: "9KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
{
id: 20,
cid: 3,
name: "ah4.jpeg",
path: "/uploads/image/20231101/106409ac-e454-47f2-a383-8ea572718b3d.jpeg",
uri: "http://localhost:8082/api/uploads/image/20231101/106409ac-e454-47f2-a383-8ea572718b3d.jpeg",
ext: "jpeg",
size: "31KB",
createTime: "2023-11-01 10:40:15",
updateTime: "2023-11-01 10:40:15",
},
];
const AnhuiSwiper = () => {
// const [albums, setAlbums] = useState<Album[]>([]);
// useEffect(() => {
// request
// .get<never, BaseResponse<PageData<Album>>>(`/albums/albumList`, {
// // baseURL: `${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}`,
// baseURL: `http://localhost:8082/api}`,
// params: {
// cid: 3,
// },
// })
// .then((res) => {
// setAlbums(() => res.data.lists);
// });
// }, []);
return (
<div className={"h-[205px] bg-white flex flex-col"}>
<div
className={
"bg-[#1f87e8] text-white h-[30px] pl-[5px] flex items-center"
}
>
</div>
<div className={"flex-1 h-0"}>
{/* @ts-ignore*/}
<swiper-container
effect={"coverflow"}
autoplay
slides-per-view="3"
loop
style={{
height: "100%",
}}
>
{/* @ts-ignore*/}
{albums.map((el) => (
// @ts-ignore
<swiper-slide
key={el.id}
style={{
display: "flex",
alignItems: "center",
}}
>
<img
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}${el.path}`}
/>
{/*@ts-ignore*/}
</swiper-slide>
))}
{/* @ts-ignore */}
</swiper-container>
</div>
</div>
);
};
export default AnhuiSwiper;

View File

@ -4,6 +4,7 @@ import styles from "@/app/assets/page.module.css";
import Link from "next/link";
import request from "@/app/lib/request";
import { listArticles } from "@/app/api/articles";
import dayjs from "dayjs";
interface ArticleLink {
title: string;
@ -17,12 +18,14 @@ const ArticleBlock = async ({
height,
category,
linkPrefix,
showDate,
}: {
title: string;
height?: number | string;
width?: number | string;
category: string;
linkPrefix: string;
showDate?: boolean;
}) => {
const data = await listArticles({ cid: category });
return (
@ -31,23 +34,34 @@ const ArticleBlock = async ({
width,
height,
}}
className={"flex flex-col"}
className={"flex flex-col overflow-hidden"}
>
<div
className={`title-bar flex items-center px-2 ${styles.articleBlockTitleBar}`}
className={`title-bar text-white flex items-center px-2 font-bold ${styles.articleBlockTitleBar} relative`}
>
<Image width={30} height={30} src={trumpetIcon} alt={"trumpet icon"} />
<span className={"ml-2 text-[14px]"}>{title}</span>
<Link
className={"absolute right-3 text-white text-xs"}
href={`${linkPrefix}/pages/1`}
>
+
</Link>
</div>
<div className={`${styles.articlesList} bg-[#e1f1fd] flex-1`}>
<ul>
{data.lists.map((article) => (
<li className={"h-7 px-1 flex items-center"} key={article.id}>
<li className={"h-8"} key={article.id}>
<Link
className={"w-full truncate text-xs"}
className={
"w-full px-1 h-full flex items-center text-xs justify-between"
}
href={`${linkPrefix}/${article.id}`}
>
{article.title}
<span className={"flex-1 truncate"}>{article.title}</span>
{showDate && (
<span>{dayjs(article.createTime).format("YYYY-MM-DD")}</span>
)}
</Link>
</li>
))}

View File

@ -0,0 +1,9 @@
const ArticleHeading = ({ text }: { text: string }) => {
return (
<h2 className={"text-center text-lg font-bold text-[#054786] mb-8"}>
{text}
</h2>
);
};
export default ArticleHeading;

View File

@ -7,7 +7,7 @@ const ArticleLayout = ({
leftNavTitle,
}: {
children: ReactNode;
navigations: any[];
navigations?: any[];
leftNavTitle: string;
}) => {
return (
@ -15,7 +15,7 @@ const ArticleLayout = ({
<div className={"left-side w-[325px]"}>
<LeftNav navigations={navigations} title={leftNavTitle} />
</div>
<div className={"flex-1 ml-3"}>{children}</div>
<div className={"flex-1 ml-3 w-0"}>{children}</div>
</div>
);
};

View File

@ -0,0 +1,44 @@
import React from "react";
import { listArticles } from "@/app/api/articles";
import styles from "./ArticleList.module.scss";
import Link from "next/link";
import Pagination from "@/app/components/Pagination";
import dayjs from "dayjs";
const ArticleList = async ({
cid,
pageNo,
title,
}: {
title: string;
cid: string;
pageNo: number;
}) => {
const data = await listArticles({
pageNo,
cid,
pageSize: 20,
sort: "new",
});
return (
<>
<h2 className={"text-[#0f6fca] text-sm"}>{title}</h2>
<ul className={`${styles.articles} mt-5`}>
{data.lists.map((article, index) => (
<li className={`${styles.article}`} key={article.id}>
<Link
className={"flex h-8 text-sm text-[#666666] items-center"}
href={`../${article.id}`}
>
<span className={"flex-1 w-0 truncate"}>{article.title}</span>
<span>{dayjs(article.createTime).format("YYYY-MM-DD")}</span>
</Link>
</li>
))}
</ul>
<Pagination page={pageNo} total={data.count} perPage={20} />
</>
);
};
export default ArticleList;

View File

@ -1,13 +1,11 @@
import React from "react";
import { ArticleDetail } from "@/app/types/article";
import Link from "next/link";
import ArticleHeading from "@/app/components/ArticleHeading";
const ArticleContent = ({ article }: { article: ArticleDetail }) => {
const ArticleRender = ({ article }: { article: ArticleDetail }) => {
return (
<div className={"h-full"}>
<h1 className={"text-[18px] text-[#054786] text-center font-bold"}>
{article.title}
</h1>
<ArticleHeading text={article.title} />
<div dangerouslySetInnerHTML={{ __html: article.content }}></div>
<div className={"bottom-nav mt-[27px] mb-[50px]"}>
<div className={"prev"}>
@ -33,4 +31,4 @@ const ArticleContent = ({ article }: { article: ArticleDetail }) => {
);
};
export default ArticleContent;
export default ArticleRender;

View File

@ -0,0 +1,19 @@
import React, { ReactNode } from "react";
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
const ArticleWithBreadcrumb = ({
breadcrumb,
children,
}: {
breadcrumb: BreadcrumbItem[];
children: ReactNode;
}) => {
return (
<div className={"flex flex-col h-full"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
</div>
);
};
export default ArticleWithBreadcrumb;

View File

@ -1,23 +1,27 @@
import { Fragment } from "react";
import Link from "next/link";
interface BreadcrumbItem {
export interface BreadcrumbItem {
href: string;
title: string;
}
const Breadcrumb = ({ navigations }: { navigations: BreadcrumbItem[] }) => {
return (
<div className={"flex text-xs text-[#13426e]"}>
<div className={"flex text-xs text-[#13426e] truncate"}>
<span className={"mr-2"}>:</span>
{navigations.map((navigation, index) => {
if (index === navigations.length - 1) {
return <div key={navigation.href}>{navigation.title}</div>;
return (
<span className={"overflow-hidden truncate"} key={navigation.href}>
{navigation.title}
</span>
);
} else {
return (
<Fragment key={navigation.href}>
<Link href={navigation.href}>{navigation.title}</Link>
<div className={"mx-2"}>/</div>
<span className={"mx-2"}>/</span>
</Fragment>
);
}

View File

@ -0,0 +1,3 @@
.titleBar {
background: linear-gradient(160deg, rgba(151, 193, 233, 1) 44.73684210526316%, rgba(15, 111, 202, 1) 100%);;
}

View File

@ -0,0 +1,77 @@
import Image from "next/image";
import Link from "next/link";
import pin from "@/app/assets/pin.png";
import styles from "./FriendLinks.module.scss";
const links = [
{
title: "中国科学院",
href: "https://www.cas.cn/",
},
{
title: "国家发改委",
href: "https://www.ndrc.gov.cn/",
},
{
title: "国家科技部",
href: "http://www.most.gov.cn/",
},
{
title: "安徽省发改委",
href: "http://fzggw.ah.gov.cn/",
},
{
title: "安徽省科技厅",
href: "http://kjt.ah.gov.cn/",
},
{
title: "中科院重庆研究院",
href: "http://www.cigit.cas.cn/",
},
{
title: "中科院成都文献情报中心",
href: "http://www.clas.ac.cn/",
},
{
title: "中国技术交易所",
href: "http://us.ctex.cn/",
},
{
title: "合肥市高新区",
href: "http://gxq.hefei.gov.cn/",
},
{
title: "合肥市发改委",
href: "http://hfdrc.hefei.gov.cn/",
},
{
title: "汇桔网",
href: "https://www.wtoip.com/",
},
];
const FriendLinks = () => {
return (
<div className={"h-[360px] bg-white"}>
<div
className={`title-bar text-black flex items-center px-2 font-bold ${styles.titleBar} relative`}
>
<Image width={30} height={30} src={pin} alt={"trumpet icon"} />
<span className={"ml-2 text-[14px]"}></span>
</div>
<ul className={"p-4"}>
{links.map((link) => (
<li key={link.href} className={"flex"}>
<Link
href={link.href}
className={"flex items-center text-xs hover:underline h-7"}
>
{link.title}
</Link>
</li>
))}
</ul>
</div>
);
};
export default FriendLinks;

View File

@ -0,0 +1,62 @@
import { articleDetail, listArticles } from "@/app/api/articles";
import Link from "next/link";
import Image from "next/image";
import { htmlToText } from "html-to-text";
const LatestNews = async () => {
const { lists } = await listArticles({
pageNo: 1,
cid: "4",
pageSize: 1,
sort: "new",
});
if (!lists.length) {
return <></>;
}
const { id } = lists[0];
const article = await articleDetail({
id: `${id}`,
});
// const text = window.document.createElement("div");
// text.innerHTML = article.content;
const content = htmlToText(article.content, {
// baseElements:{
// selectors:['p']
// }
selectors: [{ selector: "img", format: "skip" }],
});
// const content = text.innerText;
return (
<div className={"h-[180px] bg-white p-2 flex"}>
<Link
href={`general-news/${lists[0].id}`}
className={"article-cover w-[207px]"}
>
<Image src={article.image} alt={""} />
</Link>
<div className={"w-0 flex-1 ml-1 relative"}>
<Link
href={`general-news/${lists[0].id}`}
className={"title block truncate text-[#186ab6] text-base"}
>
{article.title}
</Link>
<Link
href={`general-news/${lists[0].id}`}
className={"content text-xs line-clamp-4 leading-7"}
>
{content}
</Link>
<Link
href={"/general-news/pages/1"}
className={"text-xs text-[#ffc001] absolute left-0 bottom-0"}
>
</Link>
</div>
</div>
);
};
export default LatestNews;

View File

@ -1,5 +1,5 @@
"use client";
import React from "react";
import Image from "next/image";
import circle from "@/app/assets/circle.png";
import styles from "./LeftNav.module.scss";
@ -10,7 +10,7 @@ const LeftNav = ({
navigations,
title,
}: {
navigations: any[];
navigations?: any[];
title: string;
}) => {
const pathname = usePathname();
@ -24,12 +24,12 @@ const LeftNav = ({
<Image src={circle} alt={"circle icon"} height={16} width={16} />
<span className={"pl-2"}>{title}</span>
</div>
{navigations.length > 0 && (
{(navigations?.length ?? 0) > 0 && (
<div
className={`${styles.navContent} mt-3 mx-3 rounded-lg px-2.5 py-[5px]`}
>
<ul className={styles.navItems}>
{navigations.map((navigation) => (
{navigations?.map((navigation) => (
<li key={navigation.href}>
<Link
className={`text-sm px-[9px] h-[34px] flex items-center font-bold transition-all hover:text-[#fff176] hover:text-xs ${

View File

@ -1,18 +1,42 @@
"use client";
import React from "react";
import { navigations as orgNavigations } from "@/app/(introduce)/organization/(generally)/config";
import { navigations as achieveNavigations } from "@/app/(introduce)/achievements-transformation/config";
import { navigations as talentsNavigations } from "@/app/(introduce)/talents/config";
import { navigations as academyNavigations } from "@/app/(articles)/academic-exchange/academic-events/pages/[pageIndex]/config";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useState } from "react";
const navigations = [
{ title: "首页", href: "/" },
{ title: "机构设置", href: "/organization/overview" },
{ title: "人才队伍", href: "/talents/overview" },
{ title: "科研进展", href: "#" },
{ title: "科技成果", href: "#" },
{ title: "学术交流", href: "#" },
{ title: "成果转化服务", href: "#" },
{ title: "中科院科技资源共享平台", href: "#" },
{ title: "联系我们", href: "#" },
{
title: "机构设置",
href: "/organization/overview",
children: orgNavigations,
},
{
title: "人才队伍",
href: "/talents/overview",
children: talentsNavigations,
},
{ title: "科研进展", href: "/research-progress/pages/1" },
{ title: "科技成果", href: "/technological-achievements/pages/1" },
{
title: "学术交流",
href: "/academic-exchange/academic-events/pages/1",
children: academyNavigations,
},
{
title: "成果转化服务",
href: "/achievements-transformation/government-policy",
children: achieveNavigations,
},
{
title: "中科院科技资源共享平台",
href: "https://casshare.com/experts/index.jsp",
target: "_blank",
},
{ title: "联系我们", href: "/contact-us" },
];
const isActive = (link: string, current: string): boolean => {
@ -25,13 +49,24 @@ const isActive = (link: string, current: string): boolean => {
const MainNav = () => {
const pathname = usePathname();
const [activePopup, setActivePopup] = useState(-1);
return (
<nav className={"main-nav bg-[#1958a7] h-[38px]"}>
<ul className={"w-full h-full flex"}>
{navigations.map((navigation, index) => (
<li key={navigation.title + index}>
<li
className={"relative"}
onMouseOver={() => {
setActivePopup(() => index);
}}
onMouseLeave={() => {
setActivePopup(() => -1);
}}
key={navigation.title + index}
>
<Link
href={navigation.href}
target={navigation.target}
className={`${
isActive(navigation.href, pathname)
? "text-[#dedede]"
@ -40,6 +75,31 @@ const MainNav = () => {
>
{navigation.title}
</Link>
{index === activePopup && navigation.children?.length && (
<div
className={`z-40 popup-menu min-w-[120px] absolute top-full left-1/2 -translate-x-1/2`}
>
<div
className={
"w-0 h-0 mx-auto border-b-[12px] border-l-[12px] border-r-[12px] border-b-[#b0d3eb] border-l-transparent border-r-transparent"
}
></div>
<ul className={"whitespace-nowrap bg-[#b0d3eb]"}>
{navigation.children.map((child) => (
<li key={child.href}>
<Link
className={
"h-10 flex justify-center items-center text-[13px] px-2 hover:text-[#fe5722]"
}
href={child.href}
>
{child.title}
</Link>
</li>
))}
</ul>
</div>
)}
</li>
))}
</ul>

View File

@ -15,24 +15,33 @@ const Pagination = ({
className={"w-full flex justify-center mt-2.5 h-10 items-center text-sm"}
>
{page <= 1 ? (
<div className={"prev mx-3"}></div>
<div className={"prev mx-3 text-gray-500 cursor-not-allowed"}>
</div>
) : (
<Link className={"next block mx-3"} href={`./${page - 1}`}>
</Link>
)}
{[...Array(pageCount)].map((el, index) => (
<div
key={index}
className={`page-item mx-3 ${
page === index + 1 ? "text-[#009fe9]" : "text-[#666666]"
}`}
>
{index + 1}
</div>
))}
{[...Array(pageCount)].map((el, index) =>
page === index + 1 ? (
<div key={index} className={`page-item mx-3 text-[#009fe9]`}>
{index + 1}
</div>
) : (
<Link
className={"page-item mx-3 text-[#666666]"}
key={index}
href={`./${index + 1}`}
>
{index + 1}
</Link>
),
)}
{page >= pageCount ? (
<div className={"next mx-3"}></div>
<div className={"next mx-3 text-gray-500 cursor-not-allowed"}>
</div>
) : (
<Link className={"next block mx-3"} href={`./${page + 1}`}>

View File

@ -1,7 +1,8 @@
import axios from "axios";
const axiosInstance = axios.create({
baseURL: "http://localhost:8084/api",
// baseURL: "http://localhost:8084/api",
baseURL: process.env.NEXT_PUBLIC_FRONT_BASE_URL,
});
axiosInstance.interceptors.response.use((response) => {

View File

@ -1,10 +1,14 @@
import Image from "next/image";
import leftBanner from "./assets/left-banner.jpg";
import ArticleBlock from "@/app/components/ArticleBlock";
import { register } from "swiper/element/bundle";
import AnhuiSwiper from "@/app/components/AnhuiSwiper";
import LatestNews from "@/app/components/LatestNews";
import FriendLinks from "@/app/components/FriendLinks";
export default async function Home() {
return (
<main className={"flex justify-between bg-[#f5fafe]"}>
<main className={"flex justify-between bg-[#f5fafe] mt-1"}>
<div className={"left-side w-[222px]"}>
<Image
src={leftBanner}
@ -78,47 +82,51 @@ export default async function Home() {
</map>
</div>
<div className={"main-content w-[540px]"}>
<div className={"h-[180px] bg-white"}></div>
<LatestNews />
<div className={"mt-1"}>
<ArticleBlock
height={218}
height={221}
title={"综合新闻"}
category={"4"}
linkPrefix={"/general-news"}
showDate={true}
></ArticleBlock>
</div>
<div className={"flex justify-between mt-1"}>
<ArticleBlock
width={250}
height={218}
width={"49.5%"}
height={221}
title={"科研进展"}
category={"5"}
category={"9"}
linkPrefix={"/research-progress"}
></ArticleBlock>
<ArticleBlock
width={250}
height={218}
width={"49.5%"}
height={221}
title={"学术活动"}
category={"6"}
linkPrefix={"/academic-events"}
linkPrefix={"/academic-exchange/academic-events"}
></ArticleBlock>
</div>
<div className={"flex justify-between mt-1"}>
<ArticleBlock
width={250}
height={218}
width={"49.5%"}
height={221}
title={"科技成果"}
category={"7"}
linkPrefix={"/technological-achievements"}
></ArticleBlock>
<ArticleBlock
width={250}
height={218}
width={"49.5%"}
height={221}
title={"媒体扫描"}
category={"8"}
linkPrefix={"/media-scan"}
></ArticleBlock>
</div>
<div className={"mt-1"}>
<AnhuiSwiper />
</div>
</div>
<div className={"right-side w-[225px]"}>
<ArticleBlock
@ -127,6 +135,17 @@ export default async function Home() {
height={275}
title={"公告通知"}
></ArticleBlock>
<div className={"mt-1"}>
<ArticleBlock
linkPrefix={"/recruitment"}
category={"12"}
height={275}
title={"研究院招聘"}
></ArticleBlock>
</div>
<div className={"mt-1"}>
<FriendLinks />
</div>
</div>
</main>
);

6
app/types/album.ts Normal file
View File

@ -0,0 +1,6 @@
export interface Album {
id: number;
name: string;
path: string;
uri: string;
}

View File

@ -1,4 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
}
module.exports = nextConfig

View File

@ -11,11 +11,15 @@
},
"dependencies": {
"axios": "^1.6.0",
"dayjs": "^1.11.10",
"html-to-text": "^9.0.5",
"next": "14.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"swiper": "^11.0.3"
},
"devDependencies": {
"@types/html-to-text": "^9.0.3",
"@types/node": "^20.8.9",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",

110
pnpm-lock.yaml generated
View File

@ -8,6 +8,12 @@ dependencies:
axios:
specifier: ^1.6.0
version: 1.6.0
dayjs:
specifier: ^1.11.10
version: 1.11.10
html-to-text:
specifier: ^9.0.5
version: 9.0.5
next:
specifier: 14.0.0
version: 14.0.0(react-dom@18.2.0)(react@18.2.0)(sass@1.69.5)
@ -17,8 +23,14 @@ dependencies:
react-dom:
specifier: ^18.2.0
version: 18.2.0(react@18.2.0)
swiper:
specifier: ^11.0.3
version: 11.0.3
devDependencies:
'@types/html-to-text':
specifier: ^9.0.3
version: 9.0.3
'@types/node':
specifier: ^20.8.9
version: 20.8.9
@ -279,12 +291,23 @@ packages:
resolution: {integrity: sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==}
dev: true
/@selderee/plugin-htmlparser2@0.11.0:
resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==}
dependencies:
domhandler: 5.0.3
selderee: 0.11.0
dev: false
/@swc/helpers@0.5.2:
resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==}
dependencies:
tslib: 2.6.2
dev: false
/@types/html-to-text@9.0.3:
resolution: {integrity: sha512-ImzcLdHN3+zghCoZcA+vWd/t0GhM10S7lnvSq9YA6lbo4HGK10WIJ7n+NI7mbeVZeUtgrmK5fXM66kZcws1oHA==}
dev: true
/@types/json5@0.0.29:
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
dev: true
@ -713,6 +736,10 @@ packages:
resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==}
dev: true
/dayjs@1.11.10:
resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}
dev: false
/debug@3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
peerDependencies:
@ -740,6 +767,11 @@ packages:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
dev: true
/deepmerge@4.3.1:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
dev: false
/define-data-property@1.1.1:
resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==}
engines: {node: '>= 0.4'}
@ -797,6 +829,33 @@ packages:
esutils: 2.0.3
dev: true
/dom-serializer@2.0.0:
resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
dependencies:
domelementtype: 2.3.0
domhandler: 5.0.3
entities: 4.5.0
dev: false
/domelementtype@2.3.0:
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
dev: false
/domhandler@5.0.3:
resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
engines: {node: '>= 4'}
dependencies:
domelementtype: 2.3.0
dev: false
/domutils@3.1.0:
resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==}
dependencies:
dom-serializer: 2.0.0
domelementtype: 2.3.0
domhandler: 5.0.3
dev: false
/electron-to-chromium@1.4.569:
resolution: {integrity: sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==}
dev: true
@ -813,6 +872,11 @@ packages:
tapable: 2.2.1
dev: true
/entities@4.5.0:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
dev: false
/es-abstract@1.22.3:
resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==}
engines: {node: '>= 0.4'}
@ -1463,6 +1527,26 @@ packages:
function-bind: 1.1.2
dev: true
/html-to-text@9.0.5:
resolution: {integrity: sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==}
engines: {node: '>=14'}
dependencies:
'@selderee/plugin-htmlparser2': 0.11.0
deepmerge: 4.3.1
dom-serializer: 2.0.0
htmlparser2: 8.0.2
selderee: 0.11.0
dev: false
/htmlparser2@8.0.2:
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
dependencies:
domelementtype: 2.3.0
domhandler: 5.0.3
domutils: 3.1.0
entities: 4.5.0
dev: false
/ignore@5.2.4:
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
engines: {node: '>= 4'}
@ -1739,6 +1823,10 @@ packages:
language-subtag-registry: 0.3.22
dev: true
/leac@0.6.0:
resolution: {integrity: sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==}
dev: false
/levn@0.4.1:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@ -2004,6 +2092,13 @@ packages:
callsites: 3.1.0
dev: true
/parseley@0.12.1:
resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==}
dependencies:
leac: 0.6.0
peberminta: 0.9.0
dev: false
/path-exists@4.0.0:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
@ -2028,6 +2123,10 @@ packages:
engines: {node: '>=8'}
dev: true
/peberminta@0.9.0:
resolution: {integrity: sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==}
dev: false
/picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
@ -2282,6 +2381,12 @@ packages:
loose-envify: 1.4.0
dev: false
/selderee@0.11.0:
resolution: {integrity: sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==}
dependencies:
parseley: 0.12.1
dev: false
/semver@6.3.1:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
hasBin: true
@ -2447,6 +2552,11 @@ packages:
engines: {node: '>= 0.4'}
dev: true
/swiper@11.0.3:
resolution: {integrity: sha512-MyV9ooQsriAe2EibeamqewLjgCfSvl2xoyratl6S3ln5BXDL4BzlO6mxcbLMCzQL6Z60b/u0AS/nKrepL0+TAg==}
engines: {node: '>= 4.7.0'}
dev: false
/tailwindcss@3.3.5:
resolution: {integrity: sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==}
engines: {node: '>=14.0.0'}