提交 b401ce51 authored 作者: 钟是志's avatar 钟是志

鉴权修改

上级 936b200b
......@@ -42,17 +42,6 @@ const queryConfig = (key) => {
const dynamicConfig = typeof globalThis !== 'undefined' ? globalThis.CONFIG : window.CONFIG;
// console.log(dynamicConfig);
if (typeof key === 'undefined') return dynamicConfig;
if (dynamicConfig[key] &&
typeof dynamicConfig[key] === 'string' &&
process.env.NODE_ENV === 'development' &&
window.location.href.indexOf('onestopmobile') <= -1 &&
window.location.href.indexOf('jyPortal') <= -1
) {
let url = dynamicConfig[key];
url = url.replace('https://yx.bpi.edu.cn/produce', window.location.origin + '/produce');
url = url.replace('http://scjoyedu.eicp.net:51352/produce', window.location.origin + '/produce');
return url;
}
return dynamicConfig[key];
};
......
import { getIsBei_Dian } from '@/webPublic/zyd_public/utils/utils';
export function proxyChangeUrl(url){
if (process.env.NODE_ENV === 'development' && getIsBei_Dian() && window.location.href.indexOf('onestopmobile') <= -1) {
url = url.replace('https://yx.bpi.edu.cn/produce', window.location.origin + '/produce');
url = url.replace('http://scjoyedu.eicp.net:51352/produce', window.location.origin + '/produce');
}
return url;
}
......@@ -77,7 +77,8 @@ export function getHeaders(url = '') {
},
};
console.log(url);
if (getIsBei_Dian() && userId && window.location.href.indexOf('/onestop') <= -1 && url.indexOf('/onestop') <= -1) {
if (getIsBei_Dian() && userId
) {
res.headers.auth = gg5xxxxx(secretString);
res.headers.timestamp = timestamp;
if (isTest) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论