wotokol-edm 1.1.65 → 1.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/wotokol-edm.common.js +156 -46
- package/wotokol-edm.common.js.gz +0 -0
- package/wotokol-edm.css.gz +0 -0
- package/wotokol-edm.umd.js +156 -46
- package/wotokol-edm.umd.js.gz +0 -0
- package/wotokol-edm.umd.min.js +20 -20
- package/wotokol-edm.umd.min.js.gz +0 -0
package/package.json
CHANGED
package/wotokol-edm.common.js
CHANGED
|
@@ -89460,9 +89460,9 @@ const secret = 'hoSA59LcWfCz5';
|
|
|
89460
89460
|
while (!![]) {
|
|
89461
89461
|
try {
|
|
89462
89462
|
const _0x42a87d = parseInt(_0x4ee0fa(0xae)) / 0x1 + -parseInt(_0x4ee0fa(0xb4)) / 0x2 * (-parseInt(_0x4ee0fa(0xbc)) / 0x3) + parseInt(_0x4ee0fa(0xbf)) / 0x4 + parseInt(_0x4ee0fa(0xba)) / 0x5 * (-parseInt(_0x4ee0fa(0xaf)) / 0x6) + parseInt(_0x4ee0fa(0xb6)) / 0x7 * (parseInt(_0x4ee0fa(0xb7)) / 0x8) + parseInt(_0x4ee0fa(0xb1)) / 0x9 * (parseInt(_0x4ee0fa(0xbe)) / 0xa) + parseInt(_0x4ee0fa(0xab)) / 0xb * (-parseInt(_0x4ee0fa(0xaa)) / 0xc);
|
|
89463
|
-
if (_0x42a87d === _0x3e8342) break;else _0x3d2f55[
|
|
89463
|
+
if (_0x42a87d === _0x3e8342) break;else _0x3d2f55["push"](_0x3d2f55["shift"]());
|
|
89464
89464
|
} catch (_0x30a31) {
|
|
89465
|
-
_0x3d2f55[
|
|
89465
|
+
_0x3d2f55["push"](_0x3d2f55["shift"]());
|
|
89466
89466
|
}
|
|
89467
89467
|
}
|
|
89468
89468
|
})(a0_0x4618, 0x27ae1);
|
|
@@ -89478,7 +89478,7 @@ function a0_0x5c93(_0x4cbd12, _0x41f8e9) {
|
|
|
89478
89478
|
}, a0_0x5c93(_0x4cbd12, _0x41f8e9);
|
|
89479
89479
|
}
|
|
89480
89480
|
function a0_0x4618() {
|
|
89481
|
-
const _0x1403af = [
|
|
89481
|
+
const _0x1403af = ["220JKmUTi", "647424wcZBOq", "forEach", "join", "parse", "object", "keys", "672cNtUNN", "75878KcqKRv", "assign", "string", "227842LrIoro", "6KBydfJ", "toString", "12006VhMdDm", "replace", "getOwnPropertyNames", "6284avKoRc", "timestamp", "562156ifldcF", "8bJpdQv", "push", "reverse", "239695hZNslf", "stringify", "93NmxXlV", "sort"];
|
|
89482
89482
|
a0_0x4618 = function () {
|
|
89483
89483
|
return _0x1403af;
|
|
89484
89484
|
};
|
|
@@ -89487,60 +89487,132 @@ function a0_0x4618() {
|
|
|
89487
89487
|
function signatureAlgorithm(_0x54486a, _0x235110, _0x247160, _0x4454df) {
|
|
89488
89488
|
const _0x2a24af = a0_0x5c93,
|
|
89489
89489
|
_0x811d5e = {
|
|
89490
|
-
|
|
89491
|
-
|
|
89492
|
-
|
|
89493
|
-
|
|
89490
|
+
appkey: a,
|
|
89491
|
+
s: _0x54486a,
|
|
89492
|
+
nonce: _0x235110,
|
|
89493
|
+
timestamp: _0x247160
|
|
89494
89494
|
},
|
|
89495
89495
|
_0x1bc676 = _0x4454df ? objKeySort(Object[_0x2a24af(0xac)](_0x811d5e, JSON[_0x2a24af(0xa7)](JSON[_0x2a24af(0xbb)](_0x4454df)))) : objKeySort(_0x811d5e),
|
|
89496
89496
|
_0x3ee6ea = [];
|
|
89497
89497
|
for (const _0x42cab8 in _0x1bc676) {
|
|
89498
|
-
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON[
|
|
89498
|
+
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON["stringify"](_0x1bc676[_0x42cab8]));
|
|
89499
89499
|
}
|
|
89500
|
-
Object[
|
|
89500
|
+
Object["getOwnPropertyNames"](_0x1bc676)[_0x2a24af(0xa5)](_0x55a2a0 => {
|
|
89501
89501
|
const _0x50191c = _0x2a24af;
|
|
89502
|
-
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 +
|
|
89502
|
+
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 + "=" + _0x1bc676[_0x55a2a0]);
|
|
89503
89503
|
});
|
|
89504
|
-
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)](
|
|
89504
|
+
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)]("&"),
|
|
89505
89505
|
_0xf8244e = crypto_js_default().HmacSHA256(_0x278e25, t)[_0x2a24af(0xb0)](),
|
|
89506
89506
|
_0x39978f = {
|
|
89507
|
-
|
|
89508
|
-
|
|
89507
|
+
hmacBytes: _0xf8244e,
|
|
89508
|
+
timestamp: _0x811d5e["timestamp"]
|
|
89509
89509
|
};
|
|
89510
89510
|
return _0x39978f;
|
|
89511
89511
|
}
|
|
89512
|
-
function
|
|
89513
|
-
//
|
|
89512
|
+
function getUrlParams(url) {
|
|
89513
|
+
// 获取查询字符串
|
|
89514
|
+
let queryString = "";
|
|
89515
|
+
if (typeof url === "string") {
|
|
89516
|
+
const queryStart = url.indexOf("?");
|
|
89517
|
+
if (queryStart !== -1) {
|
|
89518
|
+
queryString = url.slice(queryStart + 1);
|
|
89519
|
+
// 移除哈希部分
|
|
89520
|
+
const hashIndex = queryString.indexOf("#");
|
|
89521
|
+
if (hashIndex !== -1) {
|
|
89522
|
+
queryString = queryString.slice(0, hashIndex);
|
|
89523
|
+
}
|
|
89524
|
+
}
|
|
89525
|
+
} else {
|
|
89526
|
+
queryString = window.location.search.slice(1);
|
|
89527
|
+
}
|
|
89528
|
+
const params = {};
|
|
89529
|
+
const pairs = queryString.split("&");
|
|
89530
|
+
for (const pair of pairs) {
|
|
89531
|
+
if (!pair) continue; // 跳过空字符串
|
|
89532
|
+
|
|
89533
|
+
let [key, value] = pair.split("=");
|
|
89534
|
+
// 处理没有值的参数(如"key")
|
|
89535
|
+
if (typeof value === "undefined") value = "";
|
|
89536
|
+
|
|
89537
|
+
// 解码并转换+号为空格
|
|
89538
|
+
key = decodeURIComponent(key.replace(/\+/g, " "));
|
|
89539
|
+
value = decodeURIComponent(value.replace(/\+/g, " "));
|
|
89540
|
+
|
|
89541
|
+
// 处理重复键
|
|
89542
|
+
if (params.hasOwnProperty(key)) {
|
|
89543
|
+
if (Array.isArray(params[key])) {
|
|
89544
|
+
params[key].push(value);
|
|
89545
|
+
} else {
|
|
89546
|
+
params[key] = [params[key], value];
|
|
89547
|
+
}
|
|
89548
|
+
} else {
|
|
89549
|
+
params[key] = value;
|
|
89550
|
+
}
|
|
89551
|
+
}
|
|
89552
|
+
return params;
|
|
89553
|
+
}
|
|
89554
|
+
function signatureAlgorithmForJava(_0x54486a, _0x235110, _0x247160, _0x4454df, _key, method) {
|
|
89555
|
+
let sortedObj = {};
|
|
89556
|
+
let url = _0x54486a;
|
|
89557
|
+
let postUrlParams = {};
|
|
89558
|
+
if (method === "get") {
|
|
89559
|
+
sortedObj = Object.assign({
|
|
89560
|
+
s: url,
|
|
89561
|
+
nonce: _0x235110,
|
|
89562
|
+
timestamp: _0x247160
|
|
89563
|
+
}, JSON.parse(JSON.stringify(_0x4454df)));
|
|
89564
|
+
} else if (method === "post" || method === "put" || method === "delete") {
|
|
89565
|
+
url = _0x54486a && _0x54486a.includes("?") ? _0x54486a.split("?")[0] : _0x54486a;
|
|
89566
|
+
postUrlParams = getUrlParams(_0x54486a);
|
|
89567
|
+
if (!!_0x4454df && typeof _0x4454df === "object" && Object.keys(_0x4454df).length) {
|
|
89568
|
+
sortedObj = Object.assign({
|
|
89569
|
+
s: url,
|
|
89570
|
+
nonce: _0x235110,
|
|
89571
|
+
timestamp: _0x247160,
|
|
89572
|
+
...postUrlParams
|
|
89573
|
+
}, {
|
|
89574
|
+
p: JSON.stringify(_0x4454df)
|
|
89575
|
+
});
|
|
89576
|
+
} else {
|
|
89577
|
+
sortedObj = Object.assign({
|
|
89578
|
+
s: url,
|
|
89579
|
+
nonce: _0x235110,
|
|
89580
|
+
timestamp: _0x247160,
|
|
89581
|
+
...postUrlParams
|
|
89582
|
+
}, {});
|
|
89583
|
+
}
|
|
89584
|
+
}
|
|
89514
89585
|
const _0x2a24af = a0_0x5c93,
|
|
89515
89586
|
_0x811d5e = {
|
|
89516
|
-
|
|
89517
|
-
|
|
89518
|
-
|
|
89587
|
+
s: url,
|
|
89588
|
+
nonce: _0x235110,
|
|
89589
|
+
timestamp: _0x247160,
|
|
89590
|
+
...postUrlParams
|
|
89519
89591
|
},
|
|
89520
|
-
_0x1bc676 = _0x4454df ? objKeySort(
|
|
89592
|
+
_0x1bc676 = _0x4454df ? objKeySort(sortedObj) : objKeySort(_0x811d5e),
|
|
89521
89593
|
_0x3ee6ea = [];
|
|
89522
89594
|
for (const _0x42cab8 in _0x1bc676) {
|
|
89523
|
-
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON[
|
|
89595
|
+
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON["stringify"](_0x1bc676[_0x42cab8]));
|
|
89524
89596
|
}
|
|
89525
|
-
Object[
|
|
89597
|
+
Object["getOwnPropertyNames"](_0x1bc676)[_0x2a24af(0xa5)](_0x55a2a0 => {
|
|
89526
89598
|
const _0x50191c = _0x2a24af;
|
|
89527
|
-
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 +
|
|
89599
|
+
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 + "=" + _0x1bc676[_0x55a2a0]);
|
|
89528
89600
|
});
|
|
89529
|
-
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)](
|
|
89601
|
+
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)]("&"),
|
|
89530
89602
|
_0xf8244e = crypto_js_default().HmacSHA256(_0x278e25, _key)[_0x2a24af(0xb0)](),
|
|
89531
89603
|
_0x39978f = {
|
|
89532
|
-
|
|
89533
|
-
|
|
89604
|
+
hmacBytes: _0xf8244e,
|
|
89605
|
+
timestamp: _0x811d5e["timestamp"]
|
|
89534
89606
|
};
|
|
89535
|
-
|
|
89536
|
-
|
|
89607
|
+
console.log("-------验签");
|
|
89608
|
+
console.log(_0x278e25);
|
|
89537
89609
|
return _0x39978f;
|
|
89538
89610
|
}
|
|
89539
89611
|
function objKeySort(_0x59d16c) {
|
|
89540
89612
|
const _0x3d021c = a0_0x5c93,
|
|
89541
89613
|
_0x55835c = Object[_0x3d021c(0xa9)](_0x59d16c)[_0x3d021c(0xbd)](),
|
|
89542
89614
|
_0x48f643 = {};
|
|
89543
|
-
for (let _0x570b57 = 0x0; _0x570b57 < _0x55835c[
|
|
89615
|
+
for (let _0x570b57 = 0x0; _0x570b57 < _0x55835c["length"]; _0x570b57++) {
|
|
89544
89616
|
_0x48f643[_0x55835c[_0x570b57]] = _0x59d16c[_0x55835c[_0x570b57]];
|
|
89545
89617
|
}
|
|
89546
89618
|
return _0x48f643;
|
|
@@ -89548,31 +89620,35 @@ function objKeySort(_0x59d16c) {
|
|
|
89548
89620
|
function signatureAlgorithm2(_0x450ec5) {
|
|
89549
89621
|
const _0x239810 = a0_0x5c93,
|
|
89550
89622
|
_0x48d0b6 = {
|
|
89551
|
-
|
|
89552
|
-
|
|
89623
|
+
appkey: appkey,
|
|
89624
|
+
timestamp: new Date()["getTime"]()
|
|
89553
89625
|
},
|
|
89554
|
-
_0x3ef1f0 = _0x450ec5 ? objKeySort2(Object[
|
|
89626
|
+
_0x3ef1f0 = _0x450ec5 ? objKeySort2(Object["assign"](_0x48d0b6, {
|
|
89627
|
+
p: JSON.stringify(_0x450ec5)
|
|
89628
|
+
})) : objKeySort2(_0x48d0b6),
|
|
89555
89629
|
_0x2e2f54 = [];
|
|
89630
|
+
// console.log("-----wwwwwww");
|
|
89631
|
+
// console.log(_0x3ef1f0);
|
|
89556
89632
|
for (const _0x3748cf in _0x3ef1f0) {
|
|
89557
|
-
typeof _0x3ef1f0[_0x3748cf] === _0x239810(0xad) && (_0x3ef1f0[_0x3748cf] = _0x3ef1f0[_0x3748cf][_0x239810(0xb2)](/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g,
|
|
89633
|
+
typeof _0x3ef1f0[_0x3748cf] === _0x239810(0xad) && (_0x3ef1f0[_0x3748cf] = _0x3ef1f0[_0x3748cf][_0x239810(0xb2)](/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, "")), typeof _0x3ef1f0[_0x3748cf] === _0x239810(0xa8) && (_0x3ef1f0[_0x3748cf] = JSON[_0x239810(0xbb)](_0x3ef1f0[_0x3748cf]));
|
|
89558
89634
|
}
|
|
89559
89635
|
Object[_0x239810(0xb3)](_0x3ef1f0)[_0x239810(0xa5)](_0x588667 => {
|
|
89560
89636
|
const _0x3506b7 = _0x239810;
|
|
89561
|
-
_0x2e2f54[_0x3506b7(0xb8)](_0x3ef1f0[_0x588667] +
|
|
89637
|
+
_0x2e2f54[_0x3506b7(0xb8)](_0x3ef1f0[_0x588667] + "=" + _0x588667);
|
|
89562
89638
|
});
|
|
89563
|
-
const _0x481f2b = _0x2e2f54[_0x239810(0xa6)](
|
|
89639
|
+
const _0x481f2b = _0x2e2f54[_0x239810(0xa6)]("&"),
|
|
89564
89640
|
_0x24d2af = crypto_js_default().HmacSHA512(_0x481f2b, secret)[_0x239810(0xb0)](),
|
|
89565
89641
|
_0x422dec = {
|
|
89566
|
-
|
|
89567
|
-
|
|
89642
|
+
hmacBytes: _0x24d2af,
|
|
89643
|
+
timestamp: _0x48d0b6[_0x239810(0xb5)]
|
|
89568
89644
|
};
|
|
89569
89645
|
return _0x422dec;
|
|
89570
89646
|
}
|
|
89571
89647
|
function objKeySort2(_0x7b0de7) {
|
|
89572
89648
|
const _0x3fbcfa = a0_0x5c93,
|
|
89573
|
-
_0x236dda = Object[_0x3fbcfa(0xa9)](_0x7b0de7)[
|
|
89649
|
+
_0x236dda = Object[_0x3fbcfa(0xa9)](_0x7b0de7)["sort"]()[_0x3fbcfa(0xb9)](),
|
|
89574
89650
|
_0x5a500e = {};
|
|
89575
|
-
for (let _0x2baf9d = 0x0; _0x2baf9d < _0x236dda[
|
|
89651
|
+
for (let _0x2baf9d = 0x0; _0x2baf9d < _0x236dda["length"]; _0x2baf9d++) {
|
|
89576
89652
|
_0x5a500e[_0x236dda[_0x2baf9d]] = _0x7b0de7[_0x236dda[_0x2baf9d]];
|
|
89577
89653
|
}
|
|
89578
89654
|
return _0x5a500e;
|
|
@@ -91190,9 +91266,11 @@ service.interceptors.request.use(config => {
|
|
|
91190
91266
|
service.interceptors.response.use(response => {
|
|
91191
91267
|
const res = response.data;
|
|
91192
91268
|
try {
|
|
91193
|
-
if (response.data.code != 0) {
|
|
91269
|
+
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
91194
91270
|
// 捕获code不为0的接口异常
|
|
91195
|
-
|
|
91271
|
+
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
91272
|
+
const userId = userInfo.user_id ? userInfo.user_id : '';
|
|
91273
|
+
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
91196
91274
|
}
|
|
91197
91275
|
} catch (error) {
|
|
91198
91276
|
// 处理错误的代码,例如打印错误信息
|
|
@@ -97375,6 +97453,33 @@ function testD(str) {
|
|
|
97375
97453
|
|
|
97376
97454
|
let baseUrl = "";
|
|
97377
97455
|
let defaultEnv = "";
|
|
97456
|
+
|
|
97457
|
+
// 替换空值
|
|
97458
|
+
function replaceNullWithEmptyMutate(obj) {
|
|
97459
|
+
if (obj === null) return;
|
|
97460
|
+
if (Array.isArray(obj)) {
|
|
97461
|
+
// 修改数组元素
|
|
97462
|
+
for (let i = 0; i < obj.length; i++) {
|
|
97463
|
+
if (obj[i] === null) {
|
|
97464
|
+
obj[i] = undefined; // 直接修改数组元素
|
|
97465
|
+
} else if (typeof obj[i] === "object") {
|
|
97466
|
+
replaceNullWithEmptyMutate(obj[i]); // 递归处理嵌套结构
|
|
97467
|
+
}
|
|
97468
|
+
}
|
|
97469
|
+
} else if (typeof obj === "object") {
|
|
97470
|
+
// 修改对象属性
|
|
97471
|
+
for (const key in obj) {
|
|
97472
|
+
if (obj.hasOwnProperty(key)) {
|
|
97473
|
+
if (obj[key] === null) {
|
|
97474
|
+
obj[key] = undefined; // 直接修改属性值
|
|
97475
|
+
} else if (typeof obj[key] === "object") {
|
|
97476
|
+
replaceNullWithEmptyMutate(obj[key]); // 递归处理嵌套结构
|
|
97477
|
+
}
|
|
97478
|
+
}
|
|
97479
|
+
}
|
|
97480
|
+
}
|
|
97481
|
+
return obj; // 返回修改后的原对象
|
|
97482
|
+
}
|
|
97378
97483
|
function initJavaService(env) {
|
|
97379
97484
|
defaultEnv = env;
|
|
97380
97485
|
if (env === "dev" || env === "development" || env === "test") {
|
|
@@ -97395,13 +97500,14 @@ request_instance.interceptors.request.use(function (config) {
|
|
|
97395
97500
|
// 设置签名
|
|
97396
97501
|
let _key = uuid.v4();
|
|
97397
97502
|
const parameter = config.params || config.data;
|
|
97503
|
+
replaceNullWithEmptyMutate(parameter);
|
|
97398
97504
|
let signatureObj = {};
|
|
97399
97505
|
let signature = "";
|
|
97400
97506
|
if (parameter) {
|
|
97401
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key);
|
|
97507
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key, config.method);
|
|
97402
97508
|
signature = signatureObj.hmacBytes;
|
|
97403
97509
|
} else {
|
|
97404
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key);
|
|
97510
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key, config.method);
|
|
97405
97511
|
signature = signatureObj.hmacBytes;
|
|
97406
97512
|
}
|
|
97407
97513
|
config.baseURL = defaultEnv ? baseUrl : "https://k8s-api.wotohub.com"; //https://pre-api.kuku.info';
|
|
@@ -97480,9 +97586,11 @@ request_instance.interceptors.response.use(function (response) {
|
|
|
97480
97586
|
}
|
|
97481
97587
|
}
|
|
97482
97588
|
try {
|
|
97483
|
-
if (response.data.code != 0) {
|
|
97589
|
+
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
97484
97590
|
// 捕获code不为0的接口异常
|
|
97485
|
-
|
|
97591
|
+
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
97592
|
+
const userId = userInfo.user_id ? userInfo.user_id : '';
|
|
97593
|
+
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
97486
97594
|
}
|
|
97487
97595
|
} catch (error) {
|
|
97488
97596
|
// 处理错误的代码,例如打印错误信息
|
|
@@ -132322,9 +132430,11 @@ request_dss_instance.interceptors.response.use(function (response) {
|
|
|
132322
132430
|
alert('服务器不可用,请联系系统管理员');
|
|
132323
132431
|
}
|
|
132324
132432
|
try {
|
|
132325
|
-
if (response.data.code != 0) {
|
|
132433
|
+
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
132326
132434
|
// 捕获code不为0的接口异常
|
|
132327
|
-
|
|
132435
|
+
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
132436
|
+
const userId = userInfo.user_id ? userInfo.user_id : '';
|
|
132437
|
+
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
132328
132438
|
}
|
|
132329
132439
|
} catch (error) {
|
|
132330
132440
|
// 处理错误的代码,例如打印错误信息
|
package/wotokol-edm.common.js.gz
CHANGED
|
Binary file
|
package/wotokol-edm.css.gz
CHANGED
|
Binary file
|
package/wotokol-edm.umd.js
CHANGED
|
@@ -89470,9 +89470,9 @@ const secret = 'hoSA59LcWfCz5';
|
|
|
89470
89470
|
while (!![]) {
|
|
89471
89471
|
try {
|
|
89472
89472
|
const _0x42a87d = parseInt(_0x4ee0fa(0xae)) / 0x1 + -parseInt(_0x4ee0fa(0xb4)) / 0x2 * (-parseInt(_0x4ee0fa(0xbc)) / 0x3) + parseInt(_0x4ee0fa(0xbf)) / 0x4 + parseInt(_0x4ee0fa(0xba)) / 0x5 * (-parseInt(_0x4ee0fa(0xaf)) / 0x6) + parseInt(_0x4ee0fa(0xb6)) / 0x7 * (parseInt(_0x4ee0fa(0xb7)) / 0x8) + parseInt(_0x4ee0fa(0xb1)) / 0x9 * (parseInt(_0x4ee0fa(0xbe)) / 0xa) + parseInt(_0x4ee0fa(0xab)) / 0xb * (-parseInt(_0x4ee0fa(0xaa)) / 0xc);
|
|
89473
|
-
if (_0x42a87d === _0x3e8342) break;else _0x3d2f55[
|
|
89473
|
+
if (_0x42a87d === _0x3e8342) break;else _0x3d2f55["push"](_0x3d2f55["shift"]());
|
|
89474
89474
|
} catch (_0x30a31) {
|
|
89475
|
-
_0x3d2f55[
|
|
89475
|
+
_0x3d2f55["push"](_0x3d2f55["shift"]());
|
|
89476
89476
|
}
|
|
89477
89477
|
}
|
|
89478
89478
|
})(a0_0x4618, 0x27ae1);
|
|
@@ -89488,7 +89488,7 @@ function a0_0x5c93(_0x4cbd12, _0x41f8e9) {
|
|
|
89488
89488
|
}, a0_0x5c93(_0x4cbd12, _0x41f8e9);
|
|
89489
89489
|
}
|
|
89490
89490
|
function a0_0x4618() {
|
|
89491
|
-
const _0x1403af = [
|
|
89491
|
+
const _0x1403af = ["220JKmUTi", "647424wcZBOq", "forEach", "join", "parse", "object", "keys", "672cNtUNN", "75878KcqKRv", "assign", "string", "227842LrIoro", "6KBydfJ", "toString", "12006VhMdDm", "replace", "getOwnPropertyNames", "6284avKoRc", "timestamp", "562156ifldcF", "8bJpdQv", "push", "reverse", "239695hZNslf", "stringify", "93NmxXlV", "sort"];
|
|
89492
89492
|
a0_0x4618 = function () {
|
|
89493
89493
|
return _0x1403af;
|
|
89494
89494
|
};
|
|
@@ -89497,60 +89497,132 @@ function a0_0x4618() {
|
|
|
89497
89497
|
function signatureAlgorithm(_0x54486a, _0x235110, _0x247160, _0x4454df) {
|
|
89498
89498
|
const _0x2a24af = a0_0x5c93,
|
|
89499
89499
|
_0x811d5e = {
|
|
89500
|
-
|
|
89501
|
-
|
|
89502
|
-
|
|
89503
|
-
|
|
89500
|
+
appkey: a,
|
|
89501
|
+
s: _0x54486a,
|
|
89502
|
+
nonce: _0x235110,
|
|
89503
|
+
timestamp: _0x247160
|
|
89504
89504
|
},
|
|
89505
89505
|
_0x1bc676 = _0x4454df ? objKeySort(Object[_0x2a24af(0xac)](_0x811d5e, JSON[_0x2a24af(0xa7)](JSON[_0x2a24af(0xbb)](_0x4454df)))) : objKeySort(_0x811d5e),
|
|
89506
89506
|
_0x3ee6ea = [];
|
|
89507
89507
|
for (const _0x42cab8 in _0x1bc676) {
|
|
89508
|
-
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON[
|
|
89508
|
+
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON["stringify"](_0x1bc676[_0x42cab8]));
|
|
89509
89509
|
}
|
|
89510
|
-
Object[
|
|
89510
|
+
Object["getOwnPropertyNames"](_0x1bc676)[_0x2a24af(0xa5)](_0x55a2a0 => {
|
|
89511
89511
|
const _0x50191c = _0x2a24af;
|
|
89512
|
-
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 +
|
|
89512
|
+
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 + "=" + _0x1bc676[_0x55a2a0]);
|
|
89513
89513
|
});
|
|
89514
|
-
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)](
|
|
89514
|
+
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)]("&"),
|
|
89515
89515
|
_0xf8244e = crypto_js_default().HmacSHA256(_0x278e25, t)[_0x2a24af(0xb0)](),
|
|
89516
89516
|
_0x39978f = {
|
|
89517
|
-
|
|
89518
|
-
|
|
89517
|
+
hmacBytes: _0xf8244e,
|
|
89518
|
+
timestamp: _0x811d5e["timestamp"]
|
|
89519
89519
|
};
|
|
89520
89520
|
return _0x39978f;
|
|
89521
89521
|
}
|
|
89522
|
-
function
|
|
89523
|
-
//
|
|
89522
|
+
function getUrlParams(url) {
|
|
89523
|
+
// 获取查询字符串
|
|
89524
|
+
let queryString = "";
|
|
89525
|
+
if (typeof url === "string") {
|
|
89526
|
+
const queryStart = url.indexOf("?");
|
|
89527
|
+
if (queryStart !== -1) {
|
|
89528
|
+
queryString = url.slice(queryStart + 1);
|
|
89529
|
+
// 移除哈希部分
|
|
89530
|
+
const hashIndex = queryString.indexOf("#");
|
|
89531
|
+
if (hashIndex !== -1) {
|
|
89532
|
+
queryString = queryString.slice(0, hashIndex);
|
|
89533
|
+
}
|
|
89534
|
+
}
|
|
89535
|
+
} else {
|
|
89536
|
+
queryString = window.location.search.slice(1);
|
|
89537
|
+
}
|
|
89538
|
+
const params = {};
|
|
89539
|
+
const pairs = queryString.split("&");
|
|
89540
|
+
for (const pair of pairs) {
|
|
89541
|
+
if (!pair) continue; // 跳过空字符串
|
|
89542
|
+
|
|
89543
|
+
let [key, value] = pair.split("=");
|
|
89544
|
+
// 处理没有值的参数(如"key")
|
|
89545
|
+
if (typeof value === "undefined") value = "";
|
|
89546
|
+
|
|
89547
|
+
// 解码并转换+号为空格
|
|
89548
|
+
key = decodeURIComponent(key.replace(/\+/g, " "));
|
|
89549
|
+
value = decodeURIComponent(value.replace(/\+/g, " "));
|
|
89550
|
+
|
|
89551
|
+
// 处理重复键
|
|
89552
|
+
if (params.hasOwnProperty(key)) {
|
|
89553
|
+
if (Array.isArray(params[key])) {
|
|
89554
|
+
params[key].push(value);
|
|
89555
|
+
} else {
|
|
89556
|
+
params[key] = [params[key], value];
|
|
89557
|
+
}
|
|
89558
|
+
} else {
|
|
89559
|
+
params[key] = value;
|
|
89560
|
+
}
|
|
89561
|
+
}
|
|
89562
|
+
return params;
|
|
89563
|
+
}
|
|
89564
|
+
function signatureAlgorithmForJava(_0x54486a, _0x235110, _0x247160, _0x4454df, _key, method) {
|
|
89565
|
+
let sortedObj = {};
|
|
89566
|
+
let url = _0x54486a;
|
|
89567
|
+
let postUrlParams = {};
|
|
89568
|
+
if (method === "get") {
|
|
89569
|
+
sortedObj = Object.assign({
|
|
89570
|
+
s: url,
|
|
89571
|
+
nonce: _0x235110,
|
|
89572
|
+
timestamp: _0x247160
|
|
89573
|
+
}, JSON.parse(JSON.stringify(_0x4454df)));
|
|
89574
|
+
} else if (method === "post" || method === "put" || method === "delete") {
|
|
89575
|
+
url = _0x54486a && _0x54486a.includes("?") ? _0x54486a.split("?")[0] : _0x54486a;
|
|
89576
|
+
postUrlParams = getUrlParams(_0x54486a);
|
|
89577
|
+
if (!!_0x4454df && typeof _0x4454df === "object" && Object.keys(_0x4454df).length) {
|
|
89578
|
+
sortedObj = Object.assign({
|
|
89579
|
+
s: url,
|
|
89580
|
+
nonce: _0x235110,
|
|
89581
|
+
timestamp: _0x247160,
|
|
89582
|
+
...postUrlParams
|
|
89583
|
+
}, {
|
|
89584
|
+
p: JSON.stringify(_0x4454df)
|
|
89585
|
+
});
|
|
89586
|
+
} else {
|
|
89587
|
+
sortedObj = Object.assign({
|
|
89588
|
+
s: url,
|
|
89589
|
+
nonce: _0x235110,
|
|
89590
|
+
timestamp: _0x247160,
|
|
89591
|
+
...postUrlParams
|
|
89592
|
+
}, {});
|
|
89593
|
+
}
|
|
89594
|
+
}
|
|
89524
89595
|
const _0x2a24af = a0_0x5c93,
|
|
89525
89596
|
_0x811d5e = {
|
|
89526
|
-
|
|
89527
|
-
|
|
89528
|
-
|
|
89597
|
+
s: url,
|
|
89598
|
+
nonce: _0x235110,
|
|
89599
|
+
timestamp: _0x247160,
|
|
89600
|
+
...postUrlParams
|
|
89529
89601
|
},
|
|
89530
|
-
_0x1bc676 = _0x4454df ? objKeySort(
|
|
89602
|
+
_0x1bc676 = _0x4454df ? objKeySort(sortedObj) : objKeySort(_0x811d5e),
|
|
89531
89603
|
_0x3ee6ea = [];
|
|
89532
89604
|
for (const _0x42cab8 in _0x1bc676) {
|
|
89533
|
-
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON[
|
|
89605
|
+
typeof _0x1bc676[_0x42cab8] === _0x2a24af(0xa8) && (_0x1bc676[_0x42cab8] = JSON["stringify"](_0x1bc676[_0x42cab8]));
|
|
89534
89606
|
}
|
|
89535
|
-
Object[
|
|
89607
|
+
Object["getOwnPropertyNames"](_0x1bc676)[_0x2a24af(0xa5)](_0x55a2a0 => {
|
|
89536
89608
|
const _0x50191c = _0x2a24af;
|
|
89537
|
-
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 +
|
|
89609
|
+
_0x3ee6ea[_0x50191c(0xb8)](_0x55a2a0 + "=" + _0x1bc676[_0x55a2a0]);
|
|
89538
89610
|
});
|
|
89539
|
-
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)](
|
|
89611
|
+
const _0x278e25 = _0x3ee6ea[_0x2a24af(0xa6)]("&"),
|
|
89540
89612
|
_0xf8244e = crypto_js_default().HmacSHA256(_0x278e25, _key)[_0x2a24af(0xb0)](),
|
|
89541
89613
|
_0x39978f = {
|
|
89542
|
-
|
|
89543
|
-
|
|
89614
|
+
hmacBytes: _0xf8244e,
|
|
89615
|
+
timestamp: _0x811d5e["timestamp"]
|
|
89544
89616
|
};
|
|
89545
|
-
|
|
89546
|
-
|
|
89617
|
+
console.log("-------验签");
|
|
89618
|
+
console.log(_0x278e25);
|
|
89547
89619
|
return _0x39978f;
|
|
89548
89620
|
}
|
|
89549
89621
|
function objKeySort(_0x59d16c) {
|
|
89550
89622
|
const _0x3d021c = a0_0x5c93,
|
|
89551
89623
|
_0x55835c = Object[_0x3d021c(0xa9)](_0x59d16c)[_0x3d021c(0xbd)](),
|
|
89552
89624
|
_0x48f643 = {};
|
|
89553
|
-
for (let _0x570b57 = 0x0; _0x570b57 < _0x55835c[
|
|
89625
|
+
for (let _0x570b57 = 0x0; _0x570b57 < _0x55835c["length"]; _0x570b57++) {
|
|
89554
89626
|
_0x48f643[_0x55835c[_0x570b57]] = _0x59d16c[_0x55835c[_0x570b57]];
|
|
89555
89627
|
}
|
|
89556
89628
|
return _0x48f643;
|
|
@@ -89558,31 +89630,35 @@ function objKeySort(_0x59d16c) {
|
|
|
89558
89630
|
function signatureAlgorithm2(_0x450ec5) {
|
|
89559
89631
|
const _0x239810 = a0_0x5c93,
|
|
89560
89632
|
_0x48d0b6 = {
|
|
89561
|
-
|
|
89562
|
-
|
|
89633
|
+
appkey: appkey,
|
|
89634
|
+
timestamp: new Date()["getTime"]()
|
|
89563
89635
|
},
|
|
89564
|
-
_0x3ef1f0 = _0x450ec5 ? objKeySort2(Object[
|
|
89636
|
+
_0x3ef1f0 = _0x450ec5 ? objKeySort2(Object["assign"](_0x48d0b6, {
|
|
89637
|
+
p: JSON.stringify(_0x450ec5)
|
|
89638
|
+
})) : objKeySort2(_0x48d0b6),
|
|
89565
89639
|
_0x2e2f54 = [];
|
|
89640
|
+
// console.log("-----wwwwwww");
|
|
89641
|
+
// console.log(_0x3ef1f0);
|
|
89566
89642
|
for (const _0x3748cf in _0x3ef1f0) {
|
|
89567
|
-
typeof _0x3ef1f0[_0x3748cf] === _0x239810(0xad) && (_0x3ef1f0[_0x3748cf] = _0x3ef1f0[_0x3748cf][_0x239810(0xb2)](/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g,
|
|
89643
|
+
typeof _0x3ef1f0[_0x3748cf] === _0x239810(0xad) && (_0x3ef1f0[_0x3748cf] = _0x3ef1f0[_0x3748cf][_0x239810(0xb2)](/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, "")), typeof _0x3ef1f0[_0x3748cf] === _0x239810(0xa8) && (_0x3ef1f0[_0x3748cf] = JSON[_0x239810(0xbb)](_0x3ef1f0[_0x3748cf]));
|
|
89568
89644
|
}
|
|
89569
89645
|
Object[_0x239810(0xb3)](_0x3ef1f0)[_0x239810(0xa5)](_0x588667 => {
|
|
89570
89646
|
const _0x3506b7 = _0x239810;
|
|
89571
|
-
_0x2e2f54[_0x3506b7(0xb8)](_0x3ef1f0[_0x588667] +
|
|
89647
|
+
_0x2e2f54[_0x3506b7(0xb8)](_0x3ef1f0[_0x588667] + "=" + _0x588667);
|
|
89572
89648
|
});
|
|
89573
|
-
const _0x481f2b = _0x2e2f54[_0x239810(0xa6)](
|
|
89649
|
+
const _0x481f2b = _0x2e2f54[_0x239810(0xa6)]("&"),
|
|
89574
89650
|
_0x24d2af = crypto_js_default().HmacSHA512(_0x481f2b, secret)[_0x239810(0xb0)](),
|
|
89575
89651
|
_0x422dec = {
|
|
89576
|
-
|
|
89577
|
-
|
|
89652
|
+
hmacBytes: _0x24d2af,
|
|
89653
|
+
timestamp: _0x48d0b6[_0x239810(0xb5)]
|
|
89578
89654
|
};
|
|
89579
89655
|
return _0x422dec;
|
|
89580
89656
|
}
|
|
89581
89657
|
function objKeySort2(_0x7b0de7) {
|
|
89582
89658
|
const _0x3fbcfa = a0_0x5c93,
|
|
89583
|
-
_0x236dda = Object[_0x3fbcfa(0xa9)](_0x7b0de7)[
|
|
89659
|
+
_0x236dda = Object[_0x3fbcfa(0xa9)](_0x7b0de7)["sort"]()[_0x3fbcfa(0xb9)](),
|
|
89584
89660
|
_0x5a500e = {};
|
|
89585
|
-
for (let _0x2baf9d = 0x0; _0x2baf9d < _0x236dda[
|
|
89661
|
+
for (let _0x2baf9d = 0x0; _0x2baf9d < _0x236dda["length"]; _0x2baf9d++) {
|
|
89586
89662
|
_0x5a500e[_0x236dda[_0x2baf9d]] = _0x7b0de7[_0x236dda[_0x2baf9d]];
|
|
89587
89663
|
}
|
|
89588
89664
|
return _0x5a500e;
|
|
@@ -91200,9 +91276,11 @@ service.interceptors.request.use(config => {
|
|
|
91200
91276
|
service.interceptors.response.use(response => {
|
|
91201
91277
|
const res = response.data;
|
|
91202
91278
|
try {
|
|
91203
|
-
if (response.data.code != 0) {
|
|
91279
|
+
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
91204
91280
|
// 捕获code不为0的接口异常
|
|
91205
|
-
|
|
91281
|
+
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
91282
|
+
const userId = userInfo.user_id ? userInfo.user_id : '';
|
|
91283
|
+
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
91206
91284
|
}
|
|
91207
91285
|
} catch (error) {
|
|
91208
91286
|
// 处理错误的代码,例如打印错误信息
|
|
@@ -97385,6 +97463,33 @@ function testD(str) {
|
|
|
97385
97463
|
|
|
97386
97464
|
let baseUrl = "";
|
|
97387
97465
|
let defaultEnv = "";
|
|
97466
|
+
|
|
97467
|
+
// 替换空值
|
|
97468
|
+
function replaceNullWithEmptyMutate(obj) {
|
|
97469
|
+
if (obj === null) return;
|
|
97470
|
+
if (Array.isArray(obj)) {
|
|
97471
|
+
// 修改数组元素
|
|
97472
|
+
for (let i = 0; i < obj.length; i++) {
|
|
97473
|
+
if (obj[i] === null) {
|
|
97474
|
+
obj[i] = undefined; // 直接修改数组元素
|
|
97475
|
+
} else if (typeof obj[i] === "object") {
|
|
97476
|
+
replaceNullWithEmptyMutate(obj[i]); // 递归处理嵌套结构
|
|
97477
|
+
}
|
|
97478
|
+
}
|
|
97479
|
+
} else if (typeof obj === "object") {
|
|
97480
|
+
// 修改对象属性
|
|
97481
|
+
for (const key in obj) {
|
|
97482
|
+
if (obj.hasOwnProperty(key)) {
|
|
97483
|
+
if (obj[key] === null) {
|
|
97484
|
+
obj[key] = undefined; // 直接修改属性值
|
|
97485
|
+
} else if (typeof obj[key] === "object") {
|
|
97486
|
+
replaceNullWithEmptyMutate(obj[key]); // 递归处理嵌套结构
|
|
97487
|
+
}
|
|
97488
|
+
}
|
|
97489
|
+
}
|
|
97490
|
+
}
|
|
97491
|
+
return obj; // 返回修改后的原对象
|
|
97492
|
+
}
|
|
97388
97493
|
function initJavaService(env) {
|
|
97389
97494
|
defaultEnv = env;
|
|
97390
97495
|
if (env === "dev" || env === "development" || env === "test") {
|
|
@@ -97405,13 +97510,14 @@ request_instance.interceptors.request.use(function (config) {
|
|
|
97405
97510
|
// 设置签名
|
|
97406
97511
|
let _key = uuid.v4();
|
|
97407
97512
|
const parameter = config.params || config.data;
|
|
97513
|
+
replaceNullWithEmptyMutate(parameter);
|
|
97408
97514
|
let signatureObj = {};
|
|
97409
97515
|
let signature = "";
|
|
97410
97516
|
if (parameter) {
|
|
97411
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key);
|
|
97517
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key, config.method);
|
|
97412
97518
|
signature = signatureObj.hmacBytes;
|
|
97413
97519
|
} else {
|
|
97414
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key);
|
|
97520
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key, config.method);
|
|
97415
97521
|
signature = signatureObj.hmacBytes;
|
|
97416
97522
|
}
|
|
97417
97523
|
config.baseURL = defaultEnv ? baseUrl : "https://k8s-api.wotohub.com"; //https://pre-api.kuku.info';
|
|
@@ -97490,9 +97596,11 @@ request_instance.interceptors.response.use(function (response) {
|
|
|
97490
97596
|
}
|
|
97491
97597
|
}
|
|
97492
97598
|
try {
|
|
97493
|
-
if (response.data.code != 0) {
|
|
97599
|
+
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
97494
97600
|
// 捕获code不为0的接口异常
|
|
97495
|
-
|
|
97601
|
+
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
97602
|
+
const userId = userInfo.user_id ? userInfo.user_id : '';
|
|
97603
|
+
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
97496
97604
|
}
|
|
97497
97605
|
} catch (error) {
|
|
97498
97606
|
// 处理错误的代码,例如打印错误信息
|
|
@@ -132332,9 +132440,11 @@ request_dss_instance.interceptors.response.use(function (response) {
|
|
|
132332
132440
|
alert('服务器不可用,请联系系统管理员');
|
|
132333
132441
|
}
|
|
132334
132442
|
try {
|
|
132335
|
-
if (response.data.code != 0) {
|
|
132443
|
+
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
132336
132444
|
// 捕获code不为0的接口异常
|
|
132337
|
-
|
|
132445
|
+
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
132446
|
+
const userId = userInfo.user_id ? userInfo.user_id : '';
|
|
132447
|
+
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
132338
132448
|
}
|
|
132339
132449
|
} catch (error) {
|
|
132340
132450
|
// 处理错误的代码,例如打印错误信息
|
package/wotokol-edm.umd.js.gz
CHANGED
|
Binary file
|