fix: 修改忽略文件

This commit is contained in:
NICE CODE BY DEV 2024-03-22 09:36:52 +08:00
parent ee25cb5e30
commit cc69961d94
6 changed files with 50 additions and 14226 deletions

3
.gitignore vendored
View File

@ -13,4 +13,5 @@
.swc .swc
aircraft-carrier-fleet aircraft-carrier-fleet
dist dist
.idea .idea
pnpm-lock.yaml

View File

@ -1,43 +0,0 @@
import { defineConfig } from '@umijs/max';
export default defineConfig({
favicons: ['/assets/logo.jpg'],
access: {},
model: {},
dva: {},
request: {},
initialState: {},
layout: false,
qiankun: {
master: {
prefetch: false,
},
},
mfsu: false,
routes: [
{
name: 'cabinet',
path: '/cabinet/*',
microApp: 'cabinet',
},
{
name: 'algorithm',
path: '/algorithm/*',
microApp: 'algorithm',
},
{
name: 'video',
path: '/video/*',
microApp: 'video',
},
{
name: '物料库',
path: '/material/*',
microApp: 'material',
},
],
npmClient: 'pnpm',
define: {
APP_ENV: process.env.APP_ENV || 'development',
},
});

View File

@ -0,0 +1,23 @@
import { defineConfig } from '@umijs/max';
import routes from './routes';
export default defineConfig({
favicons: ['/assets/logo.jpg'],
access: {},
model: {},
dva: {},
request: {},
initialState: {},
layout: false,
qiankun: {
master: {
prefetch: false,
},
},
mfsu: false,
routes,
npmClient: 'pnpm',
define: {
APP_ENV: process.env.APP_ENV || 'development',
},
});

View File

@ -1,3 +1,23 @@
export default { const routes = [
routes: [], {
}; name: 'cabinet',
path: '/cabinet/*',
microApp: 'cabinet',
},
{
name: 'algorithm',
path: '/algorithm/*',
microApp: 'algorithm',
},
{
name: 'video',
path: '/video/*',
microApp: 'video',
},
{
name: '物料库',
path: '/material/*',
microApp: 'material',
},
];
export default routes;

File diff suppressed because it is too large Load Diff

View File

@ -4,11 +4,9 @@ import { API_URL } from './constants';
const doRequest: RequestConfig = { const doRequest: RequestConfig = {
timeout: 1000, timeout: 1000,
baseURL: API_URL, baseURL: API_URL,
// other axios options you want
errorConfig: { errorConfig: {
// @ts-ignore errorHandler(error, opts) {
errorHandler(error: any, opts: any) { console.log('errorHandler', error, opts);
console.log('first', error, opts);
// if (opts?.skipErrorHandler) throw error // if (opts?.skipErrorHandler) throw error
// try { // try {
// const { res } = ctx; // const { res } = ctx;
@ -43,7 +41,6 @@ const doRequest: RequestConfig = {
// throw error; // throw error;
// } // }
}, },
// @ts-ignore
errorThrower(res) { errorThrower(res) {
console.log('res', res); console.log('res', res);
}, },
@ -53,7 +50,6 @@ const doRequest: RequestConfig = {
// 一个二元组,第一个元素是 request 拦截器,第二个元素是错误处理 // 一个二元组,第一个元素是 request 拦截器,第二个元素是错误处理
[ [
(url, options) => { (url, options) => {
// console.log('options', options);
return { return {
url, url,
options: { options: {