wotokol-edm 1.1.65 → 1.1.66
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 +144 -40
- package/wotokol-edm.common.js.gz +0 -0
- package/wotokol-edm.umd.js +144 -40
- package/wotokol-edm.umd.js.gz +0 -0
- package/wotokol-edm.umd.min.js +17 -17
- 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;
|
|
@@ -97375,6 +97451,33 @@ function testD(str) {
|
|
|
97375
97451
|
|
|
97376
97452
|
let baseUrl = "";
|
|
97377
97453
|
let defaultEnv = "";
|
|
97454
|
+
|
|
97455
|
+
// 替换空值
|
|
97456
|
+
function replaceNullWithEmptyMutate(obj) {
|
|
97457
|
+
if (obj === null) return;
|
|
97458
|
+
if (Array.isArray(obj)) {
|
|
97459
|
+
// 修改数组元素
|
|
97460
|
+
for (let i = 0; i < obj.length; i++) {
|
|
97461
|
+
if (obj[i] === null) {
|
|
97462
|
+
obj[i] = undefined; // 直接修改数组元素
|
|
97463
|
+
} else if (typeof obj[i] === "object") {
|
|
97464
|
+
replaceNullWithEmptyMutate(obj[i]); // 递归处理嵌套结构
|
|
97465
|
+
}
|
|
97466
|
+
}
|
|
97467
|
+
} else if (typeof obj === "object") {
|
|
97468
|
+
// 修改对象属性
|
|
97469
|
+
for (const key in obj) {
|
|
97470
|
+
if (obj.hasOwnProperty(key)) {
|
|
97471
|
+
if (obj[key] === null) {
|
|
97472
|
+
obj[key] = undefined; // 直接修改属性值
|
|
97473
|
+
} else if (typeof obj[key] === "object") {
|
|
97474
|
+
replaceNullWithEmptyMutate(obj[key]); // 递归处理嵌套结构
|
|
97475
|
+
}
|
|
97476
|
+
}
|
|
97477
|
+
}
|
|
97478
|
+
}
|
|
97479
|
+
return obj; // 返回修改后的原对象
|
|
97480
|
+
}
|
|
97378
97481
|
function initJavaService(env) {
|
|
97379
97482
|
defaultEnv = env;
|
|
97380
97483
|
if (env === "dev" || env === "development" || env === "test") {
|
|
@@ -97395,13 +97498,14 @@ request_instance.interceptors.request.use(function (config) {
|
|
|
97395
97498
|
// 设置签名
|
|
97396
97499
|
let _key = uuid.v4();
|
|
97397
97500
|
const parameter = config.params || config.data;
|
|
97501
|
+
replaceNullWithEmptyMutate(parameter);
|
|
97398
97502
|
let signatureObj = {};
|
|
97399
97503
|
let signature = "";
|
|
97400
97504
|
if (parameter) {
|
|
97401
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key);
|
|
97505
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key, config.method);
|
|
97402
97506
|
signature = signatureObj.hmacBytes;
|
|
97403
97507
|
} else {
|
|
97404
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key);
|
|
97508
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key, config.method);
|
|
97405
97509
|
signature = signatureObj.hmacBytes;
|
|
97406
97510
|
}
|
|
97407
97511
|
config.baseURL = defaultEnv ? baseUrl : "https://k8s-api.wotohub.com"; //https://pre-api.kuku.info';
|
package/wotokol-edm.common.js.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;
|
|
@@ -97385,6 +97461,33 @@ function testD(str) {
|
|
|
97385
97461
|
|
|
97386
97462
|
let baseUrl = "";
|
|
97387
97463
|
let defaultEnv = "";
|
|
97464
|
+
|
|
97465
|
+
// 替换空值
|
|
97466
|
+
function replaceNullWithEmptyMutate(obj) {
|
|
97467
|
+
if (obj === null) return;
|
|
97468
|
+
if (Array.isArray(obj)) {
|
|
97469
|
+
// 修改数组元素
|
|
97470
|
+
for (let i = 0; i < obj.length; i++) {
|
|
97471
|
+
if (obj[i] === null) {
|
|
97472
|
+
obj[i] = undefined; // 直接修改数组元素
|
|
97473
|
+
} else if (typeof obj[i] === "object") {
|
|
97474
|
+
replaceNullWithEmptyMutate(obj[i]); // 递归处理嵌套结构
|
|
97475
|
+
}
|
|
97476
|
+
}
|
|
97477
|
+
} else if (typeof obj === "object") {
|
|
97478
|
+
// 修改对象属性
|
|
97479
|
+
for (const key in obj) {
|
|
97480
|
+
if (obj.hasOwnProperty(key)) {
|
|
97481
|
+
if (obj[key] === null) {
|
|
97482
|
+
obj[key] = undefined; // 直接修改属性值
|
|
97483
|
+
} else if (typeof obj[key] === "object") {
|
|
97484
|
+
replaceNullWithEmptyMutate(obj[key]); // 递归处理嵌套结构
|
|
97485
|
+
}
|
|
97486
|
+
}
|
|
97487
|
+
}
|
|
97488
|
+
}
|
|
97489
|
+
return obj; // 返回修改后的原对象
|
|
97490
|
+
}
|
|
97388
97491
|
function initJavaService(env) {
|
|
97389
97492
|
defaultEnv = env;
|
|
97390
97493
|
if (env === "dev" || env === "development" || env === "test") {
|
|
@@ -97405,13 +97508,14 @@ request_instance.interceptors.request.use(function (config) {
|
|
|
97405
97508
|
// 设置签名
|
|
97406
97509
|
let _key = uuid.v4();
|
|
97407
97510
|
const parameter = config.params || config.data;
|
|
97511
|
+
replaceNullWithEmptyMutate(parameter);
|
|
97408
97512
|
let signatureObj = {};
|
|
97409
97513
|
let signature = "";
|
|
97410
97514
|
if (parameter) {
|
|
97411
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key);
|
|
97515
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, parameter, _key, config.method);
|
|
97412
97516
|
signature = signatureObj.hmacBytes;
|
|
97413
97517
|
} else {
|
|
97414
|
-
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key);
|
|
97518
|
+
signatureObj = signatureAlgorithmForJava(config.url, nonce, timestamp, null, _key, config.method);
|
|
97415
97519
|
signature = signatureObj.hmacBytes;
|
|
97416
97520
|
}
|
|
97417
97521
|
config.baseURL = defaultEnv ? baseUrl : "https://k8s-api.wotohub.com"; //https://pre-api.kuku.info';
|
package/wotokol-edm.umd.js.gz
CHANGED
|
Binary file
|