test: 测试是否因为 sentry 的部分功能堵塞了渲染事件脚本
This commit is contained in:
parent
580468a3e9
commit
a70783dd55
@ -28,10 +28,10 @@ onMounted(async () => {
|
||||
console.log('get parent model', model);
|
||||
userStore.setToken(model.accessToken);
|
||||
localStorage.setItem('y-code-access-token', model.accessToken);
|
||||
request.useRequest((req) => {
|
||||
req.headers.set('Authorization', `Bearer ${model.accessToken}`);
|
||||
return req;
|
||||
});
|
||||
// request.useRequest((req) => {
|
||||
// req.headers.set('Authorization', `Bearer ${model.accessToken}`);
|
||||
// return req;
|
||||
// });
|
||||
const _engine = new Engine({
|
||||
container,
|
||||
service,
|
||||
|
@ -9,10 +9,10 @@ import { jsonp, request } from '@vtj/utils';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const service = new LowCodeService();
|
||||
request.useRequest((req) => {
|
||||
req.headers.set('Authorization', `Bearer ${userStore.token}`);
|
||||
return req;
|
||||
});
|
||||
// request.useRequest((req) => {
|
||||
// req.headers.set('Authorization', `Bearer ${userStore.token}`);
|
||||
// return req;
|
||||
// });
|
||||
const { provider, onReady } = createProvider({
|
||||
mode: ContextMode.Runtime,
|
||||
service,
|
||||
|
@ -2,6 +2,7 @@ import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import RendererAdapter from '@sy/vue3-renderer-adapter';
|
||||
import WujieVueRendererAdapter from '@sy/wujie-vue3-renderer-adapter';
|
||||
import axios from 'axios';
|
||||
|
||||
import {
|
||||
isDevMode,
|
||||
@ -11,6 +12,20 @@ import {
|
||||
VITE_V1_URL,
|
||||
} from '#/constants';
|
||||
|
||||
const baseAxios = axios.create({
|
||||
baseURL: 'http://localhost:3000',
|
||||
});
|
||||
|
||||
const testToken =
|
||||
'Bearer eyJraWQiOiJjMzA3NjIwYi1mNzUzLTQ4NjAtYmNmMi01ZDk2NDljOWJlNjYiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJzeTM1MjIiLCJhdWQiOiIxODk3MTEwMDA3NzA1MDY3NTIwIiwibmJmIjoxNzQyNTM3OTkzLCJzY29wZSI6WyJvcGVuaWQiXSwiaXNzIjoiaHR0cDovL2F1dGgtcHJvLWFwaS5zaGl5dWUuY29tIiwiZXhwIjoxNzQyNTM5NzkzLCJpYXQiOjE3NDI1Mzc5OTMsImp0aSI6ImNmZDAyMThjLWUzMmYtNDAyZi04ZmE3LTcxYWY0YzkyODBlZCJ9.REA6izxHosUyXUixXVqwjVcQeKGuUvy5T5PT-tfoP4Qp5R6GcHO81Dd8KS0Vy1jKxpmsRUSBggKxOVkuZ1eLPdUesYfItdAn6kd-VJMJlh-6R9T2wEHc4eIobCvvNnqQVBuFUU56nr-qew9Vho8BCynGZw-FxPkhi1IbmJgJRCY85XXQdBme6gNPyTWnQqaKWPQBqqmjnq8l_zk0sYPUpRvF7b-n4hBFOmiXYXfgx90RcOki2i4dzO3PTQwCPhZzXVeG2GXGORNYTm0CFCUIZkanp0tphd40Ow-wFc7bGjwcfxzpm01lBqMpfLXDILh73R9QkG0KkKM78N1f4AFu_Q';
|
||||
|
||||
baseAxios.interceptors.request.use((config) => {
|
||||
config.headers.Authorization = testToken;
|
||||
return config;
|
||||
});
|
||||
|
||||
const interceptors = baseAxios.interceptors;
|
||||
|
||||
const moduleName = 'micro';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
@ -76,18 +91,33 @@ const routes: RouteRecordRaw[] = [
|
||||
path: 'test',
|
||||
name: `Test`,
|
||||
meta: {
|
||||
hideInMenu: true,
|
||||
// hideInMenu: true,
|
||||
keepAlive: false,
|
||||
title: '测试',
|
||||
icon: 'ant-design:delete-outlined',
|
||||
},
|
||||
// <WujieVue3RendererAdapter
|
||||
// fileId="45udpmfvz"
|
||||
// :interceptors="interceptors"
|
||||
// name="45udpmfvz"
|
||||
// :degrade="false"
|
||||
// projectId="21"
|
||||
// />
|
||||
component: WujieVueRendererAdapter,
|
||||
// props: {
|
||||
// url: `${VITE_RENDERER_URL}`,
|
||||
// fileId: '45ud9h6n3',
|
||||
// projectId: LOW_CODE_PROJECT_ID,
|
||||
// degrade: false,
|
||||
// name: '45ud9h6n3',
|
||||
// },
|
||||
props: {
|
||||
url: `${VITE_RENDERER_URL}`,
|
||||
fileId: '45ud9h6n3',
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
fileId: '45udpmfvz',
|
||||
projectId: 21,
|
||||
degrade: false,
|
||||
name: '45ud9h6n3',
|
||||
name: '45udpmfvz',
|
||||
interceptors,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -21,13 +21,13 @@ Sentry.init({
|
||||
dsn: 'https://5bcf1344794fea64fc5e5fe7da4821c1@o4508962650783744.ingest.de.sentry.io/4508962653143120',
|
||||
integrations: [
|
||||
// 异常路径回放
|
||||
Sentry.replayIntegration(),
|
||||
// Sentry.replayIntegration(),
|
||||
// 异常端信息追踪
|
||||
Sentry.browserTracingIntegration(),
|
||||
// Sentry.browserTracingIntegration(),
|
||||
],
|
||||
// Session Replay
|
||||
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
||||
replaysOnErrorSampleRate: 1, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
|
||||
// replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
||||
// replaysOnErrorSampleRate: 1, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
|
||||
});
|
||||
|
||||
// 批量注册组件
|
||||
|
Loading…
x
Reference in New Issue
Block a user