diff --git a/lib/features/home/presentation/pages/productDesc.dart b/lib/features/home/presentation/pages/productDesc.dart index f00b79b8..482563d7 100644 --- a/lib/features/home/presentation/pages/productDesc.dart +++ b/lib/features/home/presentation/pages/productDesc.dart @@ -93,14 +93,16 @@ class _ManualPageState extends State { showMenu ? '使用说明' : _getCurrentTitle(), style: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xFF2A3A55)), ), - //leading: IconButton( - // icon: const Icon(Icons.arrow_back_ios, size: 16, color: Color(0xFF4A5568)), - // onPressed: () { - // if (!showMenu) { - // setState(() => showMenu = true); - // } - // }, - //), + leading: IconButton( + icon: const Icon(Icons.arrow_back_ios, size: 16, color: Color(0xFF4A5568)), + onPressed: () { + if (!showMenu) { + setState(() => showMenu = true); + } else { + Navigator.of(context).pop(); + } + }, + ), ), body: Column(children: [Expanded(child: showMenu ? _buildMenu() : _buildContent())]), ); diff --git a/lib/features/home/presentation/pages/usage.dart b/lib/features/home/presentation/pages/usage.dart index c9744db8..088fa142 100644 --- a/lib/features/home/presentation/pages/usage.dart +++ b/lib/features/home/presentation/pages/usage.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; class ProductPage extends StatefulWidget { const ProductPage({super.key}); @@ -125,6 +126,11 @@ class _ProductPageState extends State { onPressed: () => setState(() => currentPage = 0), icon: const Icon(Icons.arrow_back_ios, size: 18, color: Color(0xFF333333)), ), + if (currentPage == 0) + IconButton( + onPressed: () => context.pop(), + icon: const Icon(Icons.arrow_back_ios, size: 18, color: Color(0xFF333333)), + ), Expanded( child: Text( title, diff --git a/lib/features/machine_details/presentation/pages/machine_details_page.dart b/lib/features/machine_details/presentation/pages/machine_details_page.dart index b41520a4..84c33926 100644 --- a/lib/features/machine_details/presentation/pages/machine_details_page.dart +++ b/lib/features/machine_details/presentation/pages/machine_details_page.dart @@ -346,11 +346,9 @@ class _MachineDetailsPageState extends State { return InkWell( onTap: () { if (title == "使用说明") { - context.go(RoutePaths.usage); + context.push(RoutePaths.usage); } else { - context.go(RoutePaths.productDesc); - - //ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('暂未开放$title功能'))); + context.push(RoutePaths.productDesc); } }, child: Row(