Compare commits

...

3 Commits

Author SHA1 Message Date
wangjia c1ba6c6d97 feat(backend): 二维码链接统一改为 /app/product/ 路径,消除 URL 跳变
Deploy / build-linux-web (push) Successful in 46s
Deploy / build-windows (push) Successful in 1m41s
Deploy / build-macos (push) Successful in 1m27s
Deploy / build-android (push) Successful in 58s
Deploy / build-ios (push) Successful in 6s
Deploy / release-deploy (push) Successful in 1m53s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 17:55:24 +08:00
wangjia 2b327cd365 fix(backend): 修复 /app/product/ 分享无 OG 标签,描述分两行显示
Deploy / build-linux-web (push) Successful in 49s
Deploy / build-windows (push) Successful in 1m45s
Deploy / build-macos (push) Successful in 1m24s
Deploy / build-android (push) Successful in 58s
Deploy / build-ios (push) Failing after 10m6s
Deploy / release-deploy (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 17:52:41 +08:00
wangjia 07f8973477 fix(backend): 分享卡片描述补充系列(度数)信息
Deploy / build-linux-web (push) Successful in 47s
Deploy / build-windows (push) Successful in 1m44s
Deploy / build-macos (push) Successful in 1m26s
Deploy / build-android (push) Successful in 58s
Deploy / build-ios (push) Successful in 7s
Deploy / release-deploy (push) Successful in 1m50s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 17:36:04 +08:00
4 changed files with 38 additions and 5 deletions
+16
View File
@@ -5,6 +5,22 @@ 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.49] - 2026-06-15
### 改进
- 二维码链接统一使用 `/app/product/` 路径,扫码后 URL 不再跳变,分享与打开同一个链接
## [1.0.48] - 2026-06-15
### 修复
- 修复分享 `/app/product/` 路径时微信爬虫拿不到 OG 标签的问题(nginx 补充该路径的代理规则)
- 分享卡片描述规格/系列与门店名分两行显示
## [1.0.47] - 2026-06-15
### 修复
- 微信分享卡片描述补充度数/系列信息,不再只显示规格
## [1.0.46] - 2026-06-15
### 修复
+1 -1
View File
@@ -198,7 +198,7 @@ func (h *ProductHandler) QRCode(c *gin.Context) {
h.db.Model(&product).Update("public_id", product.PublicID)
}
url := config.C.Storage.PublicURL + "/product/" + product.PublicID
url := config.C.Storage.PublicURL + "/app/product/" + product.PublicID
if product.Code != "" {
url += "?code=" + product.Code
}
+11 -4
View File
@@ -343,14 +343,21 @@ 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
}
if desc != "" {
desc = desc + " | " + suffix
desc = desc + "\n" + suffix
} else {
desc = suffix
}
@@ -362,7 +369,7 @@ func buildProductOG(product model.Product, shopName, publicURL string) string {
}
// og:url
pageURL := publicURL + "/product/" + product.PublicID
pageURL := publicURL + "/app/product/" + product.PublicID
var sb strings.Builder
sb.WriteString("\n")
+10
View File
@@ -55,6 +55,16 @@ server {
proxy_read_timeout 30s;
}
# Flutter 路由会把 /product/:id 重写为 /app/product/:idbase-href=/app/
# 分享此 URL 时微信爬虫也需要 OG 标签 → 去掉 /app 前缀后转发后端
location ~ ^/app/product/ {
rewrite ^/app(/product/.+)$ $1 break;
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 30s;
}
# 桌面客户端安装包下载(Windows .exe / macOS .zip
location /downloads/ {
alias /opt/jiu/downloads/;