diff --git a/.env.development b/.env.development index 1dcae9d..dc0fe94 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,3 @@ -# NEXT_PUBLIC_BASE_PATH="/label" NEXT_PUBLIC_BASE_PATH="" @@ -11,4 +10,5 @@ NEXT_PUBLIC_REDIS_URL="localhost" NEXT_PUBLIC_REDIS_PORT=9765 NEXT_PUBLIC_REDIS_PASSWORD=password NEXT_PUBLIC_REDIS_USERNAME=default -NEXT_PUBLIC_REDIS_DB=0 \ No newline at end of file +NEXT_PUBLIC_REDIS_DB=0 + diff --git a/.env.staging b/.env.staging index 4089fbf..cf50bf9 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,4 @@ NEXT_PUBLIC_BASE_PATH="" -# NEXT_PUBLIC_BASE_PATH="/label" NEXT_PUBLIC_ENV=staging diff --git a/components/layout/common.ts b/components/layout/common.ts index b4d0602..121bdfd 100644 --- a/components/layout/common.ts +++ b/components/layout/common.ts @@ -11,6 +11,35 @@ export const withoutLayoutRoutes = [ "/component/label/picture/standalone", ] +export const subPathList: MenuItem[] = [ + { + title: "图片标注", + url: "image", + icon: "SystemIcon", + }, + { + title: "视频标注", + url: "video", + icon: "SystemIcon", + }, +] + +export const subConfigList: { source: string; url: string }[] = + process.env.NEXT_PUBLIC_ENV === "development" + ? [ + { + source: "/image", + url: "http://localhost:5532", + }, + { + source: "/video", + url: "http://localhost:5533", + }, + ] + : process.env.NEXT_PUBLIC_ENV === "standalone" + ? [] + : [] + export const componentList: MenuItem[] = [ { title: "管理平台", @@ -96,16 +125,7 @@ export const componentList: MenuItem[] = [ }, ], }, - { - title: "图片标注", - url: "image", - icon: "SystemIcon", - }, - { - title: "视频标注", - url: "video", - icon: "SystemIcon", - }, + ...subPathList, ] export const showList: MenuItem[] = []