From 07f89734776a34451ba7e60a9bedbac2d98ac0ed Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Mon, 15 Jun 2026 17:36:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E5=88=86=E4=BA=AB=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E6=8F=8F=E8=BF=B0=E8=A1=A5=E5=85=85=E7=B3=BB=E5=88=97?= =?UTF-8?q?=EF=BC=88=E5=BA=A6=E6=95=B0=EF=BC=89=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 5 +++++ backend/internal/handler/public.go | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a95fd1..5b3b916 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.47] - 2026-06-15 + +### 修复 +- 微信分享卡片描述补充度数/系列信息,不再只显示规格 + ## [1.0.46] - 2026-06-15 ### 修复 diff --git a/backend/internal/handler/public.go b/backend/internal/handler/public.go index df544d4..83a6a0f 100644 --- a/backend/internal/handler/public.go +++ b/backend/internal/handler/public.go @@ -343,8 +343,15 @@ func buildOGTitle(product model.Product) string { func buildProductOG(product model.Product, shopName, publicURL string) string { title := buildOGTitle(product) - // og:description:规格(度数/香型/容量)| 门店名正品 - desc := product.Spec + // og:description:系列(度数/香型)· 规格(容量/单位)| 门店名正品 + var specParts []string + if product.Series != "" { + specParts = append(specParts, product.Series) + } + if product.Spec != "" { + specParts = append(specParts, product.Spec) + } + desc := strings.Join(specParts, " · ") suffix := "正品" if shopName != "" { suffix = shopName + suffix