mobile_skt/lib/router/router.dart

71 lines
2.2 KiB
Dart

import 'package:get/get.dart';
import 'package:sk_base_mobile/models/user_info.model.dart';
import 'package:sk_base_mobile/router/auth_middleware.dart';
import 'package:sk_base_mobile/screens/guide/components/sale_quotation_guide.dart';
import 'package:sk_base_mobile/screens/guide/guide.dart';
import 'package:sk_base_mobile/screens/hr_manage/components/employee_detail.dart';
import 'package:sk_base_mobile/screens/hr_manage/hr_manage.dart';
import 'package:sk_base_mobile/screens/inventory/inventory.dart';
import 'package:sk_base_mobile/screens/login/login.dart';
import 'package:sk_base_mobile/screens/sale_quotation/sale_quotation.dart';
import '../screens/landing/landing.dart';
import '../screens/mine/useinfo/userinfo.dart';
class RouteConfig {
static const String home = "/";
static const String login = '/login';
static const String userinfo = '/userinfo';
static const String inventory = '/workbench/inventory';
static const String saleQuotation = '/workbench/sale_quotation';
static const String hrManage = '/workbench/hr_manage';
static const String employeeDetail = '/employee_detail';
static const String guide = '/guide';
static const String saleQuotationGuide = '/sale_quotation_guide';
static final List<GetPage> getPages = [
GetPage(
name: saleQuotationGuide,
page: () => SaleQuotationGuide(),
),
GetPage(
name: guide,
page: () => GuidePage(),
),
GetPage(
name: login,
page: () => LoginScreen(),
),
GetPage(name: home, page: () => LandingPage()),
GetPage(name: userinfo, page: () => UserInfoPage()),
GetPage(
name: inventory,
page: () => const InventoryPage(),
middlewares: [
// AuthMiddleware(), // 使用拦截器
],
),
GetPage(
name: saleQuotation,
page: () => SaleQuotationPage(),
middlewares: [
// AuthMiddleware(), // 使用拦截器
],
),
GetPage(
name: hrManage,
page: () => HrManagePage(),
middlewares: [
// AuthMiddleware(), // 使用拦截器
],
),
GetPage(
name: employeeDetail,
page: () => EmployeeDetail(),
middlewares: [
// AuthMiddleware(), // 使用拦截器
],
)
];
}