[JavaScript] 纯文本查看 复制代码
return h = "D23ABC@#56",
p = "",
e.endsWith(".json") || e.endsWith(".txt") || (f = e + (0 < Object.keys(u).length ? "?" + function(l) {
return Object.keys(l).sort().map((function(e) {
var a = l[e];
return "keyword" !== e && "ranktype" !== e || (a = decodeURI(decodeURI(l[e]))),
"".concat(e, "=").concat(void 0 === a ? "" : a)
}
)).join("&")
}(u) : ""),
g = void 0,
g = (t = {
SIGN: h,
str: f.replace(/^\/|https?:\/\/\/?/, "")
}).SIGN,
t = t.str,
g = r.a.HmacSHA1(r.a.enc.Utf8.parse(t), g),
g = r.a.enc.Base64.stringify(g).toString(),
p = c()(g),
u.signsafe = p,
s.find((function(l) {
return l === u.uri
}
)) || (e = f + "&signsafe=" + p)),
l.abrupt("return", i()({
url: e,
method: a,
timeout: n,
data: function(l, e) {
var a, u = {};
if (Object.keys(e).sort().forEach((function(l) {
return u[l] = Array.isArray(e[l]) ? e[l].toString() : e[l]
}
)),
"get" === l)
return JSON.stringify(u);
for (a in u)
"elective" !== a && "vote" !== a || "" == u[a] || (u[a] = -1 == u[a].indexOf(",") ? u[a].split(" ") : u[a].split(","));
return u
}(a, Object(b.a)(Object(b.a)({}, u), {}, {
signsafe: p
}))
}).then((function(l) {
return l.data
}
)).catch((function() {
return window.gio("track", "info_err", {
info_err_res: e
}),
{}
}
)).then((function(l) {
var e, a, t, b, n;
return null != l && null !== (a = l.data) && void 0 !== a && a.text && (l.data = (n = (e = {
iv: u.uri,
text: l.data.text,
SIGN: h
}).iv,
a = e.text,
e = e.SIGN,
e = r.a.PBKDF2(e, "secret", {
keySize: 8,
iterations: 1e3,
hasher: r.a.algo.SHA256
}).toString(),
n = r.a.PBKDF2(n, "secret", {
keySize: 4,
iterations: 1e3,
hasher: r.a.algo.SHA256
}).toString(),
a = r.a.lib.CipherParams.create({
ciphertext: r.a.enc.Hex.parse(a)
}),
n = r.a.AES.decrypt(a, r.a.enc.Hex.parse(e), {
iv: r.a.enc.Hex.parse(n)
}),
JSON.parse(n.toString(r.a.enc.Utf8)))),
v && (t = o,
b = l,
null !== (n = window.apiConfig) && void 0 !== n && null !== (n = n.filterCacheList) && void 0 !== n && n.length ? window.apiConfig.filterCacheList.forEach((function(l) {
new RegExp(l).test(t) || d.set(t, b)
}
)) : d.set(t, b)),
l
}
)));