Add large image action to AI recommendations
This commit is contained in:
11
app/page.tsx
11
app/page.tsx
@@ -838,14 +838,19 @@ export default function Home() {
|
||||
<div className="recommendation-grid">
|
||||
{topMatches.map((match, index) => (
|
||||
<article className={`recommendation-card ${index === 0 ? "is-primary" : ""}`} key={match.product.id}>
|
||||
<div className="recommendation-image-wrap">
|
||||
<button
|
||||
type="button"
|
||||
className="recommendation-image-wrap"
|
||||
onClick={() => setSelectedCatalogProduct(match.product)}
|
||||
aria-label={`查看${match.product.name}大图`}
|
||||
>
|
||||
<img src={match.product.image} alt={match.product.name} />
|
||||
<span className="match-badge">
|
||||
{index === 0 ? (match.coreCompatible ? "首选推荐" : "待复核候选") : `${match.confidence}% 匹配`}
|
||||
</span>
|
||||
</div>
|
||||
<span className="recommendation-zoom-hint">点击查看大图</span>
|
||||
</button>
|
||||
<div className="recommendation-content">
|
||||
<div className="match-score"><span>匹配度</span><strong>{match.confidence}%</strong></div>
|
||||
<p className="product-code">{match.product.code}</p>
|
||||
<h3>{match.product.name}</h3>
|
||||
<p className="product-subtitle">{match.product.category} · {match.product.size || "尺寸待复核"}</p>
|
||||
|
||||
Reference in New Issue
Block a user