test: 预发布加载路由异常测试
This commit is contained in:
parent
11591eefcf
commit
1c6ac05f16
@ -9,6 +9,7 @@ export type LowCodeFileSchema = {
|
||||
file_path?: string;
|
||||
project_id: number;
|
||||
publish: boolean;
|
||||
published_dsl: BlockSchema;
|
||||
};
|
||||
|
||||
function transformFile(file: LowCodeFileSchema): LowCodeFileSchema {
|
||||
|
||||
@ -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;
|
||||
},
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
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<RouteRecordRaw> = [
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'file',
|
||||
name: `${moduleName}-file`,
|
||||
path: 'DSLFileList',
|
||||
name: `${moduleName}-DSL-file-list`,
|
||||
meta: {
|
||||
title: 'dsl 文件列表',
|
||||
keepAlive: false,
|
||||
@ -53,14 +54,16 @@ const routes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
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,
|
||||
}),
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user