import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import '../pages/index.dart';

List<GetPage> pages = [
  GetPage(
      name: '/',
      page: () {
        GetStorage box = GetStorage();
        return box.hasData('token') ? Home() : MyRouteLogin();
      }),
  GetPage(name: '/main', page: () => Main()),
  GetPage(name: '/order', page: () => OrderPage()),
  GetPage(name: '/infomation', page: () => Infomation()),
  GetPage(name: '/ArticleInfo', page: () => ArticleInfo()), //资讯详情
  // GetPage(name: '/splash', page: () => SplashScreen()), // SplashScreen
  GetPage(name: '/login', page: () => MyRouteLogin()),
  GetPage(name: '/addressList', page: () => AddressList()),
  GetPage(name: '/addAddress', page: () => AddAddress()),
  GetPage(name: '/userInfo', page: () => UserInfo()),
  GetPage(name: '/machineryMap', page: () => MachineryMapPage()),
  GetPage(name: '/machineryDetail', page: () => MachineryDetailPage()),
  GetPage(name: '/aboutUs', page: () => AboutUs()),
  GetPage(name: '/agreement', page: () => Agreement()),
  GetPage(name: '/feedback', page: () => Feedback()),
  GetPage(name: '/orderConfirmation', page: () => OrderConfirmation()),
  GetPage(name: '/orderPageInfo', page: () => OrderPageInfo()),
  GetPage(name: '/searchPage', page: () => SearchPage()),
];