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

优化代码

上级 a516288c
import { getIsBei_Dian } from '@/webPublic/zyd_public/utils/utils'; import { getIsBei_Dian } from '@/webPublic/zyd_public/utils/utils';
export function proxyChangeUrl(url){ export function proxyChangeUrl(url){
if (process.env.NODE_ENV === 'development' && getIsBei_Dian()) { 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('https://yx.bpi.edu.cn/produce', window.location.origin + '/produce');
url = url.replace('http://scjoyedu.eicp.net:51352/produce', window.location.origin + '/produce'); url = url.replace('http://scjoyedu.eicp.net:51352/produce', window.location.origin + '/produce');
} }
......
...@@ -8,62 +8,62 @@ const isTest = getUrlInfo().test; ...@@ -8,62 +8,62 @@ const isTest = getUrlInfo().test;
window.differenceBetweenServerAndClientTime = window.differenceBetweenServerAndClientTime || 0; window.differenceBetweenServerAndClientTime = window.differenceBetweenServerAndClientTime || 0;
/** // /**
* 混淆代码 // * 混淆代码
* 2022年7月12日 // * 2022年7月12日
* 钟是志 // * 钟是志
* */ // * */
function _0x202e(_0x548f51, _0x50b3ff) { // function _0x202e(_0x548f51, _0x50b3ff) {
const _0x568ad8 = _0x568a(); // const _0x568ad8 = _0x568a();
return _0x202e = function (_0x202e02, _0x19f086) { // return _0x202e = function (_0x202e02, _0x19f086) {
_0x202e02 = _0x202e02 - 0x7d; // _0x202e02 = _0x202e02 - 0x7d;
let _0x29770a = _0x568ad8[_0x202e02]; // let _0x29770a = _0x568ad8[_0x202e02];
return _0x29770a; // return _0x29770a;
}, _0x202e(_0x548f51, _0x50b3ff); // }, _0x202e(_0x548f51, _0x50b3ff);
} // }
//
(function (_0x4c31fc, _0x463010) { // (function (_0x4c31fc, _0x463010) {
const _0x552fa4 = _0x202e, // const _0x552fa4 = _0x202e,
_0x1cd81c = _0x4c31fc(); // _0x1cd81c = _0x4c31fc();
while (!![]) { // while (!![]) {
try { // try {
const _0xcda188 = -parseInt(_0x552fa4(0x8e)) / 0x1 * (parseInt(_0x552fa4(0x84)) / 0x2) + -parseInt(_0x552fa4(0x7d)) / 0x3 + parseInt(_0x552fa4(0x7f)) / 0x4 + -parseInt(_0x552fa4(0x86)) / 0x5 + parseInt(_0x552fa4(0x88)) / 0x6 * (parseInt(_0x552fa4(0x82)) / 0x7) + -parseInt(_0x552fa4(0x80)) / 0x8 + parseInt(_0x552fa4(0x8a)) / 0x9 * (parseInt(_0x552fa4(0x85)) / 0xa); // const _0xcda188 = -parseInt(_0x552fa4(0x8e)) / 0x1 * (parseInt(_0x552fa4(0x84)) / 0x2) + -parseInt(_0x552fa4(0x7d)) / 0x3 + parseInt(_0x552fa4(0x7f)) / 0x4 + -parseInt(_0x552fa4(0x86)) / 0x5 + parseInt(_0x552fa4(0x88)) / 0x6 * (parseInt(_0x552fa4(0x82)) / 0x7) + -parseInt(_0x552fa4(0x80)) / 0x8 + parseInt(_0x552fa4(0x8a)) / 0x9 * (parseInt(_0x552fa4(0x85)) / 0xa);
if (_0xcda188 === _0x463010) break; else _0x1cd81c['push'](_0x1cd81c['shift']()); // if (_0xcda188 === _0x463010) break; else _0x1cd81c['push'](_0x1cd81c['shift']());
} catch (_0x1d86df) { // } catch (_0x1d86df) {
_0x1cd81c['push'](_0x1cd81c['shift']()); // _0x1cd81c['push'](_0x1cd81c['shift']());
} // }
} // }
}(_0x568a, 0xb25c4)); // }(_0x568a, 0xb25c4));
//
function _0x568a() { // function _0x568a() {
const _0x292465 = ['differenceBetweenServerAndClientTime', '823318RXJXMw', '457340BzvYDX', '3527100qnMDjU', 'xgUserId', '6362418YdxbkN', 'getTime', '639OXEuzj', 'headers', 'bearer\x20', 'timestamp', '1HcmGrw', '3967845wgMCjN', 'log', '151716ARnHER', '9401504aZEgWQ', 'auth', '7SfPUZN']; // const _0x292465 = ['differenceBetweenServerAndClientTime', '823318RXJXMw', '457340BzvYDX', '3527100qnMDjU', 'xgUserId', '6362418YdxbkN', 'getTime', '639OXEuzj', 'headers', 'bearer\x20', 'timestamp', '1HcmGrw', '3967845wgMCjN', 'log', '151716ARnHER', '9401504aZEgWQ', 'auth', '7SfPUZN'];
_0x568a = function () { // _0x568a = function () {
return _0x292465; // return _0x292465;
}; // };
return _0x568a(); // return _0x568a();
} // }
//
//
export function getHeaders(_0x586d90 = '') { // export function getHeaders(_0x586d90 = '') {
const _0x489a38 = _0x202e, // const _0x489a38 = _0x202e,
_0x4fc1a2 = getToken(), // _0x4fc1a2 = getToken(),
_0x37ba84 = getCurrentUser() || {}, // _0x37ba84 = getCurrentUser() || {},
_0x1db761 = getUserInfo() || {}, // _0x1db761 = getUserInfo() || {},
_0x4e0063 = _0x1db761['id'] || _0x37ba84[_0x489a38(0x87)], // _0x4e0063 = _0x1db761['id'] || _0x37ba84[_0x489a38(0x87)],
_0x5a5180 = new Date()[_0x489a38(0x89)]() + window[_0x489a38(0x83)], // _0x5a5180 = new Date()[_0x489a38(0x89)]() + window[_0x489a38(0x83)],
_0x297709 = _0x4fc1a2 + _0x4e0063 + _0x5a5180, // _0x297709 = _0x4fc1a2 + _0x4e0063 + _0x5a5180,
_0xd71cea = { 'headers': { 'Authorization': _0x489a38(0x8c) + _0x4fc1a2 } }; // _0xd71cea = { 'headers': { 'Authorization': _0x489a38(0x8c) + _0x4fc1a2 } };
return getIsBei_Dian() && _0x4e0063 && (_0xd71cea[_0x489a38(0x8b)][_0x489a38(0x81)] = gg5xxxxx(_0x297709), _0xd71cea['headers'][_0x489a38(0x8d)] = _0x5a5180, isTest && console[_0x489a38(0x7e)]({ // return getIsBei_Dian() && _0x4e0063 && (_0xd71cea[_0x489a38(0x8b)][_0x489a38(0x81)] = gg5xxxxx(_0x297709), _0xd71cea['headers'][_0x489a38(0x8d)] = _0x5a5180, isTest && console[_0x489a38(0x7e)]({
})), _0xd71cea; // })), _0xd71cea;
} // }
/** // /**
* 混淆代码 // * 混淆代码
* 2022年7月12日 // * 2022年7月12日
* 钟是志 // * 钟是志
* */ // * */
export function getHeadersBase(url = '') { export function getHeaders(url = '') {
const token = getToken(); const token = getToken();
const currentInfo = getCurrentUser() || {}; const currentInfo = getCurrentUser() || {};
const user = getUserInfo() || {}; const user = getUserInfo() || {};
...@@ -76,7 +76,8 @@ export function getHeadersBase(url = '') { ...@@ -76,7 +76,8 @@ export function getHeadersBase(url = '') {
Authorization: `bearer ${token}`, Authorization: `bearer ${token}`,
}, },
}; };
if (getIsBei_Dian() && userId) { console.log(url);
if (getIsBei_Dian() && userId && window.location.href.indexOf('/onestop') <= -1) {
res.headers.auth = gg5xxxxx(secretString); res.headers.auth = gg5xxxxx(secretString);
res.headers.timestamp = timestamp; res.headers.timestamp = timestamp;
if (isTest) { if (isTest) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论