From 26c08e09744feed0841ec72b2d7dd2f750be28bb Mon Sep 17 00:00:00 2001 From: wangxuefeng Date: Fri, 14 Mar 2025 13:53:47 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E5=AD=90=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=8A=A0=E8=BD=BD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/src/router/routes/modules/acl.ts | 39 ++++++------------- .../src/router/routes/modules/application.ts | 17 ++++---- .../src/router/routes/modules/micro.ts | 2 - 3 files changed, 19 insertions(+), 39 deletions(-) diff --git a/apps/platform/src/router/routes/modules/acl.ts b/apps/platform/src/router/routes/modules/acl.ts index 8f23f51..9c8659c 100644 --- a/apps/platform/src/router/routes/modules/acl.ts +++ b/apps/platform/src/router/routes/modules/acl.ts @@ -1,15 +1,8 @@ import type { RouteRecordRaw } from 'vue-router'; -import { h } from 'vue'; - import RendererAdapter from '@sy/vue3-renderer-adapter'; import { VITE_RENDERER_URL } from '#/constants'; -import { - LOW_CODE_APPLICATION_ID, - LOW_CODE_PROJECT_ID, -} from '#/constants/low-code'; -import { useUserStore } from '#/store/user'; const moduleName = 'acl'; @@ -31,16 +24,12 @@ const routes: Array = [ keepAlive: true, icon: 'ant-design:list', }, - component: () => { - const userStore = useUserStore(); - return h(RendererAdapter, { - url: VITE_RENDERER_URL, - name: 'y-code-platform-project-list', - accessToken: userStore.token, - applicationId: LOW_CODE_APPLICATION_ID, - projectId: LOW_CODE_PROJECT_ID, - fileId: '1hsd0407hf', - }); + component: RendererAdapter, + props: { + url: `${VITE_RENDERER_URL}`, + accessToken: localStorage.getItem('y-code-access-token'), + fileId: '1hsd0407hf', + projectId: '4', }, }, { @@ -51,16 +40,12 @@ const routes: Array = [ keepAlive: false, icon: 'ant-design:list', }, - component: () => { - const userStore = useUserStore(); - return h(RendererAdapter, { - url: VITE_RENDERER_URL, - name: 'y-code-platform-user-list', - accessToken: userStore.token, - applicationId: LOW_CODE_APPLICATION_ID, - projectId: LOW_CODE_PROJECT_ID, - fileId: '7pfu5radx', - }); + component: RendererAdapter, + props: { + url: `${VITE_RENDERER_URL}`, + accessToken: localStorage.getItem('y-code-access-token'), + fileId: '7pfu5radx', + projectId: '4', }, }, ], diff --git a/apps/platform/src/router/routes/modules/application.ts b/apps/platform/src/router/routes/modules/application.ts index 9cd8508..8706eb9 100644 --- a/apps/platform/src/router/routes/modules/application.ts +++ b/apps/platform/src/router/routes/modules/application.ts @@ -1,7 +1,5 @@ import type { RouteRecordRaw } from 'vue-router'; -import { h } from 'vue'; - import RendererAdapter from '@sy/vue3-renderer-adapter'; import { VITE_RENDERER_URL } from '#/constants'; @@ -26,14 +24,13 @@ const routes: Array = [ keepAlive: false, icon: 'ant-design:list', }, - component: () => - h(RendererAdapter, { - url: VITE_RENDERER_URL, - name: 'y-code-platform-application-list', - applicationId: 0, - projectId: 4, - fileId: 'b91n1y9yr', - }), + component: RendererAdapter, + props: { + url: `${VITE_RENDERER_URL}`, + accessToken: localStorage.getItem('y-code-access-token'), + fileId: 'b91n1y9yr', + projectId: '4', + }, }, ], }, diff --git a/apps/platform/src/router/routes/modules/micro.ts b/apps/platform/src/router/routes/modules/micro.ts index 261d3ef..71ceec7 100644 --- a/apps/platform/src/router/routes/modules/micro.ts +++ b/apps/platform/src/router/routes/modules/micro.ts @@ -43,8 +43,6 @@ const routes: RouteRecordRaw[] = [ props: { url: `${VITE_V1_URL}`, accessToken: localStorage.getItem('y-code-access-token'), - fileId: '4g4mz6qi8u', - projectId: '4', }, }, ],