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

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;
}