|
@@ -10,14 +10,17 @@ import 'package:farmer_client/pages/orderInfo/index.dart';
|
10
|
10
|
import 'package:farmer_client/pages/search/index.jsx.dart';
|
11
|
11
|
import 'package:farmer_client/pages/userInfo/index.dart';
|
12
|
12
|
import 'package:get/get.dart';
|
|
13
|
+import 'package:get_storage/get_storage.dart';
|
13
|
14
|
import '../pages/MoreCars/index.dart';
|
14
|
15
|
import '../pages/index.dart';
|
15
|
16
|
|
16
|
|
-
|
17
|
17
|
List<GetPage> pages = [
|
18
|
|
- GetPage(name: '/', page: () => Home()),
|
|
18
|
+ GetPage(name: '/', page: () {
|
|
19
|
+ GetStorage box = GetStorage();
|
|
20
|
+ return box.hasData('token') ? Home() : MyRouteLogin();
|
|
21
|
+ }),
|
19
|
22
|
GetPage(name: '/ArticleInfo', page: () => ArticleInfo()),//资讯详情
|
20
|
|
- GetPage(name: '/splash', page: () => SplashScreen()),//SplashScreen
|
|
23
|
+ // GetPage(name: '/splash', page: () => SplashScreen()), // SplashScreen
|
21
|
24
|
GetPage(name: '/login', page: () => MyRouteLogin()),
|
22
|
25
|
GetPage(name: '/addressList', page: () => AddressList()),
|
23
|
26
|
GetPage(name: '/addAddress', page: () => AddAddress()),
|