Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07f8973477 | |||
| 3b02a848c0 |
@@ -5,6 +5,16 @@ 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/),
|
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).
|
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
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
- 微信内打开商品页时顶部标题栏显示商品名称,不再显示"岩美"
|
||||||
|
|
||||||
## [1.0.45] - 2026-06-15
|
## [1.0.45] - 2026-06-15
|
||||||
|
|
||||||
### 修复
|
### 修复
|
||||||
|
|||||||
@@ -343,8 +343,15 @@ func buildOGTitle(product model.Product) string {
|
|||||||
func buildProductOG(product model.Product, shopName, publicURL string) string {
|
func buildProductOG(product model.Product, shopName, publicURL string) string {
|
||||||
title := buildOGTitle(product)
|
title := buildOGTitle(product)
|
||||||
|
|
||||||
// og:description:规格(度数/香型/容量)| 门店名正品
|
// og:description:系列(度数/香型)· 规格(容量/单位)| 门店名正品
|
||||||
desc := product.Spec
|
var specParts []string
|
||||||
|
if product.Series != "" {
|
||||||
|
specParts = append(specParts, product.Series)
|
||||||
|
}
|
||||||
|
if product.Spec != "" {
|
||||||
|
specParts = append(specParts, product.Spec)
|
||||||
|
}
|
||||||
|
desc := strings.Join(specParts, " · ")
|
||||||
suffix := "正品"
|
suffix := "正品"
|
||||||
if shopName != "" {
|
if shopName != "" {
|
||||||
suffix = shopName + suffix
|
suffix = shopName + suffix
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:math' as math;
|
|||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import '../../core/config/app_config.dart';
|
import '../../core/config/app_config.dart';
|
||||||
@@ -54,6 +55,13 @@ class _PublicProductScreenState extends State<PublicProductScreen> {
|
|||||||
);
|
);
|
||||||
final data = (resp.data as Map<String, dynamic>)['data'] as Map<String, dynamic>;
|
final data = (resp.data as Map<String, dynamic>)['data'] as Map<String, dynamic>;
|
||||||
setState(() { _data = data; _loading = false; });
|
setState(() { _data = data; _loading = false; });
|
||||||
|
// 更新浏览器标签标题(Flutter Web 会写 document.title)
|
||||||
|
final name = data['name'] as String? ?? '';
|
||||||
|
if (name.isNotEmpty) {
|
||||||
|
SystemChrome.setApplicationSwitcherDescription(
|
||||||
|
ApplicationSwitcherDescription(label: name, primaryColor: 0xFF8B2331),
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setState(() { _error = e.toString(); _loading = false; });
|
setState(() { _error = e.toString(); _loading = false; });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user