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
@@ -58,7 +58,7 @@ class _ShopHomeView extends StatelessWidget { | @@ -58,7 +58,7 @@ class _ShopHomeView extends StatelessWidget { | ||
58 | ), | 58 | ), |
59 | color: Colors.white, | 59 | color: Colors.white, |
60 | onPressed: () { | 60 | onPressed: () { |
61 | - showToast('购前须知'); | 61 | + pushNamed(AppRouteName.shopDesc); |
62 | }, | 62 | }, |
63 | ) | 63 | ) |
64 | ], | 64 | ], |
lib/route/route.dart
@@ -17,6 +17,7 @@ import 'package:wow_english/pages/repeatafter/repeat_after_page.dart'; | @@ -17,6 +17,7 @@ import 'package:wow_english/pages/repeatafter/repeat_after_page.dart'; | ||
17 | import 'package:wow_english/pages/repeataftercontent/repeat_after_content_page.dart'; | 17 | import 'package:wow_english/pages/repeataftercontent/repeat_after_content_page.dart'; |
18 | import 'package:wow_english/pages/shop/exchane/exchange_lesson_page.dart'; | 18 | import 'package:wow_english/pages/shop/exchane/exchange_lesson_page.dart'; |
19 | import 'package:wow_english/pages/shop/exchangelist/exchange_lesson_list_page.dart'; | 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 | import 'package:wow_english/pages/shop/home/shop_home_page.dart'; | 21 | import 'package:wow_english/pages/shop/home/shop_home_page.dart'; |
21 | import 'package:wow_english/pages/user/information/user_information_page.dart'; | 22 | import 'package:wow_english/pages/user/information/user_information_page.dart'; |
22 | import 'package:wow_english/pages/user/modify/modify_user_avatar_page.dart'; | 23 | import 'package:wow_english/pages/user/modify/modify_user_avatar_page.dart'; |
@@ -49,6 +50,7 @@ class AppRouteName { | @@ -49,6 +50,7 @@ class AppRouteName { | ||
49 | static const String courseSection = 'courseSections'; | 50 | static const String courseSection = 'courseSections'; |
50 | static const String listen = 'listen'; | 51 | static const String listen = 'listen'; |
51 | static const String shop = 'shop'; | 52 | static const String shop = 'shop'; |
53 | + static const String shopDesc = 'shopDesc'; | ||
52 | static const String exLesson = 'exLesson'; | 54 | static const String exLesson = 'exLesson'; |
53 | static const String exList = 'exList'; | 55 | static const String exList = 'exList'; |
54 | static const String reAfter = 'reAfter'; | 56 | static const String reAfter = 'reAfter'; |
@@ -141,6 +143,8 @@ class AppRouter { | @@ -141,6 +143,8 @@ class AppRouter { | ||
141 | return CupertinoPageRoute(builder: (_) => const ListenPage()); | 143 | return CupertinoPageRoute(builder: (_) => const ListenPage()); |
142 | case AppRouteName.shop: | 144 | case AppRouteName.shop: |
143 | return CupertinoPageRoute(builder: (_) => const ShopHomePage()); | 145 | return CupertinoPageRoute(builder: (_) => const ShopHomePage()); |
146 | + case AppRouteName.shopDesc: | ||
147 | + return CupertinoPageRoute(builder: (_) => const ShopDescPage()); | ||
144 | case AppRouteName.pay: | 148 | case AppRouteName.pay: |
145 | var productEntity = ProductEntity(); | 149 | var productEntity = ProductEntity(); |
146 | if (settings.arguments != null && settings.arguments is ProductEntity) { | 150 | if (settings.arguments != null && settings.arguments is ProductEntity) { |