|
|
|
@ -74,7 +74,7 @@ const List = memo<ListProps>(async ({ category, searchKeywords, items = [] }) =>
|
|
|
|
|
};
|
|
|
|
|
fetchData();
|
|
|
|
|
}, []); // 空数组[]意味着仅在组件挂载时调用一次
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleClickCard = (item) => {
|
|
|
|
|
console.log(item)
|
|
|
|
|
router.push(urlJoin('/discover/model/', item.identifier))
|
|
|
|
@ -108,7 +108,7 @@ const List = memo<ListProps>(async ({ category, searchKeywords, items = [] }) =>
|
|
|
|
|
<Grid maxItemWidth={280} rows={4}>
|
|
|
|
|
{stData.map((item) => (
|
|
|
|
|
// <Link href={urlJoin('/discover/assistant/', item.identifier)} key={item.identifier}>
|
|
|
|
|
<Card key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
|
|
|
|
|
<Card style={{boxShadow: "1px 0px 12px 0px rgba(42, 77, 255, 0.19)"}} key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
|
|
|
|
|
// </Link>
|
|
|
|
|
))}
|
|
|
|
|
</Grid>
|
|
|
|
@ -121,7 +121,7 @@ const List = memo<ListProps>(async ({ category, searchKeywords, items = [] }) =>
|
|
|
|
|
initialItemCount={24}
|
|
|
|
|
itemContent={(_, item) => (
|
|
|
|
|
// <Link href={urlJoin('/discover/model/', item.identifier)} key={item.identifier}>
|
|
|
|
|
<Card key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
|
|
|
|
|
<Card style={{boxShadow: "1px 0px 12px 0px rgba(42, 77, 255, 0.19)"}} key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
|
|
|
|
|
// </Link>
|
|
|
|
|
)}
|
|
|
|
|
style={{
|
|
|
|
|