登录流程已全部重构
This commit is contained in:
@@ -4,6 +4,9 @@ class RoutePaths {
|
||||
///闪烁页
|
||||
static const splash = "/";
|
||||
|
||||
///引导页
|
||||
static const intro = "/intro";
|
||||
|
||||
///协议页
|
||||
static const agreement = "/agreement";
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import 'package:food_health/layout/layout_page.dart';
|
||||
import 'package:food_health/page/system/login/login_code_page.dart';
|
||||
import 'package:food_health/page/system/splash/splash_page.dart';
|
||||
import 'package:food_health/pages/system/code/login_code_page.dart';
|
||||
import 'package:food_health/pages/system/intro/intro_page.dart';
|
||||
import 'package:food_health/pages/system/splash/splash_page.dart';
|
||||
import 'package:food_health/pages/system/test_page.dart';
|
||||
import 'package:food_health/router/config/route_paths.dart';
|
||||
|
||||
import '../../page/system/agree/agree_page.dart';
|
||||
import '../../page/system/login/login_page.dart';
|
||||
import '../../pages/system/agree/agree_page.dart';
|
||||
import '../../pages/system/login/login_page.dart';
|
||||
import '../config/route_type.dart';
|
||||
|
||||
List<RouteType> baseRoutes = [
|
||||
@@ -30,6 +32,12 @@ List<RouteType> baseRoutes = [
|
||||
return LoginPage();
|
||||
},
|
||||
),
|
||||
RouteType(
|
||||
path: RoutePaths.intro,
|
||||
child: (state) {
|
||||
return IntroPage();
|
||||
},
|
||||
),
|
||||
RouteType(
|
||||
path: RoutePaths.loginCode,
|
||||
child: (state) {
|
||||
@@ -46,4 +54,10 @@ List<RouteType> baseRoutes = [
|
||||
return LayoutPage();
|
||||
},
|
||||
),
|
||||
RouteType(
|
||||
path: "/test",
|
||||
child: (state) {
|
||||
return TestPage();
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:food_health/page/profile/edit/my_edit_page.dart';
|
||||
import 'package:food_health/pages/profile/edit/my_edit_page.dart';
|
||||
|
||||
import '../../page/record/detail/record_detail_page.dart';
|
||||
import '../../pages/record/detail/record_detail_page.dart';
|
||||
import '../config/route_paths.dart';
|
||||
import '../config/route_type.dart';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ List<RouteBase> routes = routeConfigs.map((item) {
|
||||
|
||||
//变量命名
|
||||
GoRouter goRouter = GoRouter(
|
||||
initialLocation: RoutePaths.splash,
|
||||
initialLocation: RoutePaths.intro,
|
||||
routes: routes,
|
||||
navigatorKey: navigatorKey,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user