diff --git a/assets/images/shop_desc.png b/assets/images/shop_desc.png new file mode 100644 index 0000000..5d3de69 --- /dev/null +++ b/assets/images/shop_desc.png diff --git a/lib/pages/shop/home/shop_desc_page.dart b/lib/pages/shop/home/shop_desc_page.dart new file mode 100644 index 0000000..5121b3b --- /dev/null +++ b/lib/pages/shop/home/shop_desc_page.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +import 'package:wow_english/common/extension/string_extension.dart'; +import 'package:wow_english/common/widgets/we_app_bar.dart'; + +///购前须知页 +class ShopDescPage extends StatelessWidget { + const ShopDescPage({super.key}); + + @override + Widget build(BuildContext context) { + return _ShopDescPageView(); + } +} + +class _ShopDescPageView extends StatelessWidget { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const WEAppBar( + titleText: '购前须知', + centerTitle: true, + ), + body: SingleChildScrollView( + child: Center( + child: Image.asset('shop_desc'.assetPng), + ), + ), + ); + } +} diff --git a/lib/pages/shop/home/shop_home_page.dart b/lib/pages/shop/home/shop_home_page.dart index 481e22e..b33ab4a 100644 --- a/lib/pages/shop/home/shop_home_page.dart +++ b/lib/pages/shop/home/shop_home_page.dart @@ -58,7 +58,7 @@ class _ShopHomeView extends StatelessWidget { ), color: Colors.white, onPressed: () { - showToast('购前须知'); + pushNamed(AppRouteName.shopDesc); }, ) ], diff --git a/lib/route/route.dart b/lib/route/route.dart index 8fddf58..0bc1908 100644 --- a/lib/route/route.dart +++ b/lib/route/route.dart @@ -17,6 +17,7 @@ import 'package:wow_english/pages/repeatafter/repeat_after_page.dart'; import 'package:wow_english/pages/repeataftercontent/repeat_after_content_page.dart'; import 'package:wow_english/pages/shop/exchane/exchange_lesson_page.dart'; import 'package:wow_english/pages/shop/exchangelist/exchange_lesson_list_page.dart'; +import 'package:wow_english/pages/shop/home/shop_desc_page.dart'; import 'package:wow_english/pages/shop/home/shop_home_page.dart'; import 'package:wow_english/pages/user/information/user_information_page.dart'; import 'package:wow_english/pages/user/modify/modify_user_avatar_page.dart'; @@ -49,6 +50,7 @@ class AppRouteName { static const String courseSection = 'courseSections'; static const String listen = 'listen'; static const String shop = 'shop'; + static const String shopDesc = 'shopDesc'; static const String exLesson = 'exLesson'; static const String exList = 'exList'; static const String reAfter = 'reAfter'; @@ -141,6 +143,8 @@ class AppRouter { return CupertinoPageRoute(builder: (_) => const ListenPage()); case AppRouteName.shop: return CupertinoPageRoute(builder: (_) => const ShopHomePage()); + case AppRouteName.shopDesc: + return CupertinoPageRoute(builder: (_) => const ShopDescPage()); case AppRouteName.pay: var productEntity = ProductEntity(); if (settings.arguments != null && settings.arguments is ProductEntity) {