From 3b02a848c06cf7f761407c2583140c0f4dba7d5e Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Mon, 15 Jun 2026 17:26:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E5=95=86=E5=93=81=E5=85=AC?= =?UTF-8?q?=E5=BC=80=E9=A1=B5=E5=8A=A0=E8=BD=BD=E5=90=8E=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=A0=87=E9=A2=98=E4=B8=BA=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=90=8D=E7=A7=B0?= 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 +++++ client/lib/screens/public/public_product_screen.dart | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c5ab6..0a95fd1 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.46] - 2026-06-15 + +### 修复 +- 微信内打开商品页时顶部标题栏显示商品名称,不再显示"岩美" + ## [1.0.45] - 2026-06-15 ### 修复 diff --git a/client/lib/screens/public/public_product_screen.dart b/client/lib/screens/public/public_product_screen.dart index b09ce59..7154bd4 100644 --- a/client/lib/screens/public/public_product_screen.dart +++ b/client/lib/screens/public/public_product_screen.dart @@ -2,6 +2,7 @@ import 'dart:math' as math; import 'package:dio/dio.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:go_router/go_router.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../core/config/app_config.dart'; @@ -54,6 +55,13 @@ class _PublicProductScreenState extends State { ); final data = (resp.data as Map)['data'] as Map; 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) { setState(() { _error = e.toString(); _loading = false; }); }