diff --git a/src/components/layout/layout_config.tsx b/src/components/layout/layout_config.tsx index 8dc3712..7ef62bc 100644 --- a/src/components/layout/layout_config.tsx +++ b/src/components/layout/layout_config.tsx @@ -30,6 +30,16 @@ export const items: ItemType[] = [ { key: "/city/food", label: `地方美食` }, ], }, + { + key: "/charity", + label: `公益管理`, + icon: , + children: [ + { key: "/charity/setting", label: `公益设置` }, + { key: "/charity/af", label: `求助申请` }, + { key: "/charity/artic", label: `公益文章` }, + ], + }, { key: "/sku", label: `商品管理`, diff --git a/src/pages/charity/af/index.tsx b/src/pages/charity/af/index.tsx new file mode 100644 index 0000000..ba20d91 --- /dev/null +++ b/src/pages/charity/af/index.tsx @@ -0,0 +1,8 @@ +const Setting = ()=>{ + return ( +
+ Setting +
+ ) +} +export default Setting \ No newline at end of file diff --git a/src/pages/charity/artic/index.tsx b/src/pages/charity/artic/index.tsx new file mode 100644 index 0000000..ba20d91 --- /dev/null +++ b/src/pages/charity/artic/index.tsx @@ -0,0 +1,8 @@ +const Setting = ()=>{ + return ( +
+ Setting +
+ ) +} +export default Setting \ No newline at end of file diff --git a/src/pages/charity/index.tsx b/src/pages/charity/index.tsx new file mode 100644 index 0000000..ea9c9e2 --- /dev/null +++ b/src/pages/charity/index.tsx @@ -0,0 +1,11 @@ +import { Outlet } from "react-router"; + +const Charity = () => { + return ( +
+ +
+ ); +}; + +export default Charity; diff --git a/src/pages/charity/setting/index.tsx b/src/pages/charity/setting/index.tsx new file mode 100644 index 0000000..ba20d91 --- /dev/null +++ b/src/pages/charity/setting/index.tsx @@ -0,0 +1,8 @@ +const Setting = ()=>{ + return ( +
+ Setting +
+ ) +} +export default Setting \ No newline at end of file diff --git a/src/router/index.tsx b/src/router/index.tsx index 45abfd5..918edff 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -1,9 +1,10 @@ import { createHashRouter } from "react-router-dom"; import LayOut from "@/components/layout/layout"; -import { rbac } from "./routers/rbac_router"; -import { sku } from "./routers/sku_router"; -import { sys } from "./routers/sys_router"; -import { city } from "./routers/city_router"; +import { rbac } from "@/router/routers/rbac_router"; +import { sku } from "@/router/routers/sku_router"; +import { sys } from "@/router/routers/sys_router"; +import { city } from "@/router/routers/city_router"; +import { charity } from "@/router/routers/charity"; const routers = createHashRouter([ { @@ -35,7 +36,10 @@ const routers = createHashRouter([ Component:(await import("@/pages/order")).default, }) }, - + ...charity, + // { key: "/charity/setting", label: `公益设置` }, + // { key: "/charity/af", label: `求助申请` }, + // { key: "/charity/artic", label: `公益文章` }, ], }, { diff --git a/src/router/routers/charity.tsx b/src/router/routers/charity.tsx new file mode 100644 index 0000000..2a03623 --- /dev/null +++ b/src/router/routers/charity.tsx @@ -0,0 +1,31 @@ +export const charity = [ + { + path: "/charity", + lazy: async () => ({ + Component: (await import("@/pages/charity")).default, + }), + children: [ + { + path: "/charity/setting", + index: true, + lazy: async () => ({ + Component: (await import("@/pages/charity/setting")).default, + }), + }, + { + path: "/charity/af", + index: true, + lazy: async () => ({ + Component: (await import("@/pages/charity/af")).default, + }), + }, + { + path: "/charity/artic", + index: true, + lazy: async () => ({ + Component: (await import("@/pages/charity/artic")).default, + }), + }, + ], + }, +]; diff --git a/src/service/config.ts b/src/service/config.ts index 7967781..77e9a81 100644 --- a/src/service/config.ts +++ b/src/service/config.ts @@ -6,7 +6,6 @@ class UserConfig { static DELETE: string = "/user"; } - class CityConfig { static ADD: string = "/city"; static EDIT: string = "/city"; @@ -69,4 +68,15 @@ class SpecConfig { static LIST: string = "/skuSpec/list"; static DELETE: string = "/skuSpec"; } -export { UserConfig, CityConfig, SkuCatConfig, SkuConfig, Orderconfig, TagConfig, SpecConfig, CityHistoryConfig, CityHumIntroConfig, CityLocalFoodConfig }; \ No newline at end of file +export { + UserConfig, + CityConfig, + SkuCatConfig, + SkuConfig, + Orderconfig, + TagConfig, + SpecConfig, + CityHistoryConfig, + CityHumIntroConfig, + CityLocalFoodConfig +}; \ No newline at end of file