update
This commit is contained in:
@ -154,7 +154,7 @@ const AnhuiSwiper = () => {
|
||||
className={"h-full w-full object-contain"}
|
||||
src={`${
|
||||
process.env.NEXT_PUBLIC_CLIENT_ADMIN_BASE_URL
|
||||
}${el.path.replace(/^api/, "")}`}
|
||||
}${el.path.match(/\/uploads\/.*/)?.[0]}`}
|
||||
alt={""}
|
||||
/>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@ const ArticleBlock = async ({
|
||||
linkPrefix: string;
|
||||
showDate?: boolean;
|
||||
}) => {
|
||||
const data = await listArticles({ cid: category });
|
||||
const data = await listArticles({ cid: category, sort: "new" });
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
|
@ -72,14 +72,22 @@ const ArticleItem = ({ article }: { article: Article }) => {
|
||||
const { data } = useSWR(`/pc/articleDetail?id=${article.id}`, (key) =>
|
||||
axiosClientInstance.get<never, BaseResponse<ArticleDetail>>(key),
|
||||
);
|
||||
|
||||
const cover_path = article.image?.match(/\/uploads\/.*/)?.[0];
|
||||
return (
|
||||
<div className={"flex h-[108px] w-full px-2 py-4"}>
|
||||
<Link
|
||||
className={"aspect-square"}
|
||||
href={`/branch-life-sketch/${article.id}`}
|
||||
>
|
||||
<img alt={""} className={"h-full w-full"} src={article.image} />
|
||||
<img
|
||||
alt={""}
|
||||
className={"h-full w-full"}
|
||||
src={
|
||||
cover_path
|
||||
? `${process.env.NEXT_PUBLIC_CLIENT_ADMIN_BASE_URL}${cover_path}`
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</Link>
|
||||
|
||||
<div className={"ml-1 w-0 flex-1"}>
|
||||
|
Reference in New Issue
Block a user