From 1c6ac05f16623d15f6adef31823b56af0ab8bd04 Mon Sep 17 00:00:00 2001 From: wangxuefeng Date: Thu, 13 Mar 2025 18:25:18 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E9=A2=84=E5=8F=91=E5=B8=83=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E8=B7=AF=E7=94=B1=E5=BC=82=E5=B8=B8=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/designer/src/io/file.ts | 1 + apps/designer/src/io/instance.ts | 2 -- apps/platform/src/app.vue | 2 +- .../src/router/routes/modules/project.ts | 23 +++++++++++-------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/apps/designer/src/io/file.ts b/apps/designer/src/io/file.ts index 9bcc4cc..1265b00 100644 --- a/apps/designer/src/io/file.ts +++ b/apps/designer/src/io/file.ts @@ -9,6 +9,7 @@ export type LowCodeFileSchema = { file_path?: string; project_id: number; publish: boolean; + published_dsl: BlockSchema; }; function transformFile(file: LowCodeFileSchema): LowCodeFileSchema { diff --git a/apps/designer/src/io/instance.ts b/apps/designer/src/io/instance.ts index 68735d4..b1f6766 100644 --- a/apps/designer/src/io/instance.ts +++ b/apps/designer/src/io/instance.ts @@ -13,8 +13,6 @@ instance.interceptors.request.use( (config) => { // 可在此处添加统一请求头等配置 const userStore = useUserStore(); - console.log(localStorage.getItem('y-code-access-token')); - console.log(userStore.token); config.headers.Authorization = `Bearer ${userStore.token}`; return config; }, diff --git a/apps/platform/src/app.vue b/apps/platform/src/app.vue index 3a276fd..aba014e 100644 --- a/apps/platform/src/app.vue +++ b/apps/platform/src/app.vue @@ -6,7 +6,7 @@ import { ElConfigProvider } from 'element-plus'; import { elementLocale } from '#/locales'; import { useUserStore } from '#/store/user'; -defineOptions({ name: 'App' }); +defineOptions({ name: 'YCode' }); useElementPlusDesignTokens(); diff --git a/apps/platform/src/router/routes/modules/project.ts b/apps/platform/src/router/routes/modules/project.ts index f69dc33..cfbaf79 100644 --- a/apps/platform/src/router/routes/modules/project.ts +++ b/apps/platform/src/router/routes/modules/project.ts @@ -33,6 +33,7 @@ const routes: Array = [ }, component: () => { const userStore = useUserStore(); + console.log(userStore.token); return h(RendererAdapter, { url: VITE_RENDERER_URL, name: 'y-code-platform-project-list', @@ -44,8 +45,8 @@ const routes: Array = [ }, }, { - path: 'file', - name: `${moduleName}-file`, + path: 'DSLFileList', + name: `${moduleName}-DSL-file-list`, meta: { title: 'dsl 文件列表', keepAlive: false, @@ -53,14 +54,16 @@ const routes: Array = [ }, component: () => { const userStore = useUserStore(); - return h(RendererAdapter, { - url: VITE_RENDERER_URL, - name: 'y-code-platform-project-file', - applicationId: LOW_CODE_APPLICATION_ID, - projectId: LOW_CODE_PROJECT_ID, - fileId: '7pftwojzu', - accessToken: userStore.token, - }); + return Promise.resolve( + h(RendererAdapter, { + url: VITE_RENDERER_URL, + name: 'y-code-platform-project-DSL-file-list', + applicationId: LOW_CODE_APPLICATION_ID, + projectId: LOW_CODE_PROJECT_ID, + fileId: '7pftwojzu', + accessToken: userStore.token, + }), + ); }, }, ],