Commit fc3c67bf410cc8a659e77605cfe5527e90f0ea77
1 parent
2d1ead53
feat:新增购前须知页
Showing
4 changed files
with
37 additions
and
1 deletions
assets/images/shop_desc.png
0 → 100644
746 KB
lib/pages/shop/home/shop_desc_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | |
| 2 | + | |
| 3 | +import 'package:wow_english/common/extension/string_extension.dart'; | |
| 4 | +import 'package:wow_english/common/widgets/we_app_bar.dart'; | |
| 5 | + | |
| 6 | +///购前须知页 | |
| 7 | +class ShopDescPage extends StatelessWidget { | |
| 8 | + const ShopDescPage({super.key}); | |
| 9 | + | |
| 10 | + @override | |
| 11 | + Widget build(BuildContext context) { | |
| 12 | + return _ShopDescPageView(); | |
| 13 | + } | |
| 14 | +} | |
| 15 | + | |
| 16 | +class _ShopDescPageView extends StatelessWidget { | |
| 17 | + | |
| 18 | + @override | |
| 19 | + Widget build(BuildContext context) { | |
| 20 | + return Scaffold( | |
| 21 | + appBar: const WEAppBar( | |
| 22 | + titleText: '购前须知', | |
| 23 | + centerTitle: true, | |
| 24 | + ), | |
| 25 | + body: SingleChildScrollView( | |
| 26 | + child: Center( | |
| 27 | + child: Image.asset('shop_desc'.assetPng), | |
| 28 | + ), | |
| 29 | + ), | |
| 30 | + ); | |
| 31 | + } | |
| 32 | +} | ... | ... |
lib/pages/shop/home/shop_home_page.dart
lib/route/route.dart
| ... | ... | @@ -17,6 +17,7 @@ import 'package:wow_english/pages/repeatafter/repeat_after_page.dart'; |
| 17 | 17 | import 'package:wow_english/pages/repeataftercontent/repeat_after_content_page.dart'; |
| 18 | 18 | import 'package:wow_english/pages/shop/exchane/exchange_lesson_page.dart'; |
| 19 | 19 | import 'package:wow_english/pages/shop/exchangelist/exchange_lesson_list_page.dart'; |
| 20 | +import 'package:wow_english/pages/shop/home/shop_desc_page.dart'; | |
| 20 | 21 | import 'package:wow_english/pages/shop/home/shop_home_page.dart'; |
| 21 | 22 | import 'package:wow_english/pages/user/information/user_information_page.dart'; |
| 22 | 23 | import 'package:wow_english/pages/user/modify/modify_user_avatar_page.dart'; |
| ... | ... | @@ -49,6 +50,7 @@ class AppRouteName { |
| 49 | 50 | static const String courseSection = 'courseSections'; |
| 50 | 51 | static const String listen = 'listen'; |
| 51 | 52 | static const String shop = 'shop'; |
| 53 | + static const String shopDesc = 'shopDesc'; | |
| 52 | 54 | static const String exLesson = 'exLesson'; |
| 53 | 55 | static const String exList = 'exList'; |
| 54 | 56 | static const String reAfter = 'reAfter'; |
| ... | ... | @@ -141,6 +143,8 @@ class AppRouter { |
| 141 | 143 | return CupertinoPageRoute(builder: (_) => const ListenPage()); |
| 142 | 144 | case AppRouteName.shop: |
| 143 | 145 | return CupertinoPageRoute(builder: (_) => const ShopHomePage()); |
| 146 | + case AppRouteName.shopDesc: | |
| 147 | + return CupertinoPageRoute(builder: (_) => const ShopDescPage()); | |
| 144 | 148 | case AppRouteName.pay: |
| 145 | 149 | var productEntity = ProductEntity(); |
| 146 | 150 | if (settings.arguments != null && settings.arguments is ProductEntity) { | ... | ... |