fix bug orgId not send
parent
480e9fbfa9
commit
34a01f9b80
|
|
@ -1,92 +0,0 @@
|
||||||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/8 13:28:37] App_Identifier[safetyEval]"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
|
||||||
const APP_ENV = {
|
|
||||||
antd: {
|
|
||||||
'ant-prefix': 'micro-temp',
|
|
||||||
fontFamily: 'PingFangSC-Regular',
|
|
||||||
colorPrimary: '#1677ff',
|
|
||||||
borderRadius: parseInt('2')
|
|
||||||
},
|
|
||||||
appKey: '',
|
|
||||||
basename: 'safetyEval',
|
|
||||||
API_HOST: ''
|
|
||||||
};
|
|
||||||
const injectedApiHost = APP_ENV.API_HOST;
|
|
||||||
const isDev = 'production' === 'development';
|
|
||||||
// 开发环境优先 jjb.config 注入的 API_HOST,避免 sessionStorage 残留网关地址导致 Network Error
|
|
||||||
if (isDev && injectedApiHost && injectedApiHost.indexOf('http') === 0) {
|
|
||||||
APP_ENV.API_HOST = injectedApiHost;
|
|
||||||
} else {
|
|
||||||
APP_ENV.API_HOST = sessionStorage.API_HOST || injectedApiHost || window.location.origin;
|
|
||||||
}
|
|
||||||
window.process = {
|
|
||||||
env: { app: APP_ENV },
|
|
||||||
NODE_ENV: 'production'
|
|
||||||
};
|
|
||||||
window.__JJB_ENVIRONMENT__ = {
|
|
||||||
API_HOST: APP_ENV.API_HOST,
|
|
||||||
redirect: '',
|
|
||||||
FRAMEWORK: APP_ENV.antd
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
// 抑制 ResizeObserver 在页面/标签切换时的无害告警,避免 dev overlay 误报
|
|
||||||
(function () {
|
|
||||||
if (typeof window.ResizeObserver !== 'undefined') {
|
|
||||||
var NativeResizeObserver = window.ResizeObserver;
|
|
||||||
window.ResizeObserver = class extends NativeResizeObserver {
|
|
||||||
constructor(callback) {
|
|
||||||
super(function (entries, observer) {
|
|
||||||
window.requestAnimationFrame(function () {
|
|
||||||
callback(entries, observer);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function isResizeObserverLoopError(message) {
|
|
||||||
return typeof message === 'string' && message.indexOf('ResizeObserver loop') !== -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isAxiosNetworkError(reason) {
|
|
||||||
if (!reason) return false;
|
|
||||||
var msg = typeof reason === 'string' ? reason : (reason.message || '');
|
|
||||||
return msg === 'Network Error' || (reason.isAxiosError && msg === 'Network Error');
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('error', function (event) {
|
|
||||||
if (isResizeObserverLoopError(event.message)) {
|
|
||||||
event.stopImmediatePropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
window.addEventListener('unhandledrejection', function (event) {
|
|
||||||
if (isAxiosNetworkError(event.reason)) {
|
|
||||||
console.warn('[dev] API unreachable:', event.reason?.config?.url || event.reason?.message);
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
window.jjbCommonGlobalConfig = {
|
|
||||||
// http拦截器
|
|
||||||
httpInterceptor: {
|
|
||||||
// 请求拦截
|
|
||||||
request: (url, method, params, headers) => {
|
|
||||||
// 处理你的请求拦截
|
|
||||||
|
|
||||||
// 给请求头添加一个租户ID
|
|
||||||
if(sessionStorage.getItem('orgInfoId')){
|
|
||||||
headers.orgInfoId = sessionStorage.getItem('orgInfoId');
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.resolve([
|
|
||||||
url,
|
|
||||||
method,
|
|
||||||
params,
|
|
||||||
headers
|
|
||||||
])
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}</script><script defer="defer" src="/safetyEval/static/js/379.7b4c2533d0a3b689.js"></script><script defer="defer" src="/safetyEval/static/js/121.ae75e71830bf4ae0.js"></script><script defer="defer" src="/safetyEval/static/js/289.f12da2fe2f6ad2ae.js"></script><script defer="defer" src="/safetyEval/static/js/main.462147da76f42199.js"></script><link href="/safetyEval/static/css/main.cb6068c6562f0d94.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息 */console.log("%c@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/8 13:28:37] App_Identifier[safetyEval] Frontend_Branch[dev] Backend_Branch[dev]", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1 +0,0 @@
|
||||||
module.exports={compact:!1,plugins:[["@babel/plugin-proposal-decorators",{legacy:!0}]],presets:[["@babel/preset-env",{targets:{browsers:["ie >= 10"]}}],["@babel/preset-react",{runtime:"automatic"}]]};
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
module.exports={javaGit:"http://47.92.113.182:3000/cq_anquan/safety-eval-service.git",javaGitName:"safety-eval-service",environment:{development:{javaGitBranch:"dev",API_HOST:"http://192.168.0.152"},production:{javaGitBranch:"dev",API_HOST:""}},appIdentifier:"safetyEval",contextInject:{appKey:"",fileUrl:"https://skqhdg.porthebei.com:9004/file/uploadFiles2/"},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8081",host:"192.168.0.187",open:!1},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,68 +0,0 @@
|
||||||
{
|
|
||||||
"name": "micro-app",
|
|
||||||
"version": "2.0.0",
|
|
||||||
"description": "建教帮微应用模板",
|
|
||||||
"author": "JJB",
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"serve": "node node_modules/@cqsjjb/scripts/rspack.dev.server.js",
|
|
||||||
"build": "node node_modules/@cqsjjb/scripts/rspack.build.js",
|
|
||||||
"push": "jjb-cmd push java production",
|
|
||||||
"clean-cache": "rimraf node_modules/.cache/webpack",
|
|
||||||
"serve:development": "cross-env NODE_ENV=development npm run serve",
|
|
||||||
"serve:production": "cross-env NODE_ENV=production npm run serve",
|
|
||||||
"build:development": "cross-env NODE_ENV=development npm run build",
|
|
||||||
"build:production": "cross-env NODE_ENV=production npm run build",
|
|
||||||
"code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js",
|
|
||||||
"lint": "eslint --ext .js,.jsx,.tsx --fix src",
|
|
||||||
"test:enterprise-info": "node docs/test-reports/测试用例/test-enterprise-info-api.mjs",
|
|
||||||
"test:enterprise-info:granular": "node docs/test-reports/测试用例/test-enterprise-info-granular.mjs"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@ant-design/icons": "^5.0.0",
|
|
||||||
"@ant-design/pro-components": "^2.8.10",
|
|
||||||
"@cqsjjb/jjb-common-decorator": "latest",
|
|
||||||
"@cqsjjb/jjb-common-lib": "latest",
|
|
||||||
"@cqsjjb/jjb-dva-runtime": "latest",
|
|
||||||
"@cqsjjb/jjb-react-admin-component": "latest",
|
|
||||||
"@rc-component/motion": "^1.0.0",
|
|
||||||
"@rc-component/util": "^1.11.1",
|
|
||||||
"ahooks": "^3.9.5",
|
|
||||||
"antd": "^5.29.2",
|
|
||||||
"dayjs": "^1.11.7",
|
|
||||||
"echarts": "^6.1.0",
|
|
||||||
"lodash-es": "^4.17.21",
|
|
||||||
"qrcode.react": "^4.2.0",
|
|
||||||
"react": "^18.2.0",
|
|
||||||
"react-dom": "^18.2.0",
|
|
||||||
"zy-react-library": "^1.2.3"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
|
||||||
"@babel/plugin-proposal-decorators": "^7.19.3",
|
|
||||||
"@babel/preset-env": "^7.29.7",
|
|
||||||
"@babel/preset-react": "^7.29.7",
|
|
||||||
"@cqsjjb/scripts": "latest",
|
|
||||||
"@eslint-react/eslint-plugin": "^2.2.2",
|
|
||||||
"ajv": "^8.20.0",
|
|
||||||
"babel-loader": "^9.1.3",
|
|
||||||
"cross-env": "^7.0.3",
|
|
||||||
"css-loader": "^6.8.1",
|
|
||||||
"eslint": "^9.37.0",
|
|
||||||
"eslint-plugin-format": "^1.0.2",
|
|
||||||
"eslint-plugin-react-hooks": "^7.0.0",
|
|
||||||
"eslint-plugin-react-refresh": "^0.4.23",
|
|
||||||
"file-loader": "^6.2.0",
|
|
||||||
"less-loader": "^11.1.3",
|
|
||||||
"react-refresh": "^0.14.2",
|
|
||||||
"style-loader": "^3.3.3",
|
|
||||||
"typescript": "^5.9.3"
|
|
||||||
},
|
|
||||||
"resolutions": {
|
|
||||||
"history": "^4.10.1",
|
|
||||||
"path-to-regexp": "^1.9.0",
|
|
||||||
"react": "$react",
|
|
||||||
"react-dom": "$react-dom"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue