forked from gzzfw/frontEnd/gzDyh

xusd
2024-09-18 3ae864f005e8a874de01c15e14b83196a3f6f11b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-02-14 15:48:51
 * @LastEditTime: 2022-11-01 09:25:05
 * @LastEditors: ldh
 * @Version: 1.0.0
 * @Description: 路由
 */
import React from 'react';
import { HashRouter as Router, Route, Routes, Navigate } from 'react-router-dom';
import Navigation from '../components/Navigation';
 
import Login from '../views/login';
import Customer from '../views/customer/customerList';
import CustomerInfo from '../views/customer/customerForm';
import CustomerDetail from '../views/customer/customerDetail';
import AddVersion from '../views/customer/addVersion';
import AddMeal from '../views/customer/addMeal';
import AddPayee from '../views/customer/addPayee';
import Feature from '../views/feature';
import Edition from '../views/edition';
 
const Routers = () => {
    return (
        <Router>
            <Routes>
                <Route path="/login" exact element={<Login />} />
                <Route path="/operation" element={<Navigation />}>
                    <Route path="customer" element={<Customer />} />
                    <Route path="customer/Info/:id/:status/:title" element={<CustomerInfo />} />
                    <Route path="customer/detail/:id/:title" element={<CustomerDetail />} />
                    <Route path="customer/addVersion/:id/:title/:verId" element={<AddVersion />} />
                    <Route path="customer/addMeal/:id/:title/:mealIds" element={<AddMeal />} />
                    <Route path="customer/addPayee/:id/:title" element={<AddPayee />} />
                    <Route path="feature" element={<Feature />} />
                    <Route path="edition" element={<Edition />} />
                </Route>
                <Route path="*" element={<Navigate to="/operation/customer" />} />
            </Routes>
        </Router>
    );
};
 
export default Routers;