js求助各位大佬
function r(e) {for (var t = N ? "0123456789ABCDEF" : "0123456789abcdef", n = "", a = 0; a < 4 * e.length; a++)
n += t.charAt(e >> a % 4 * 8 + 4 & 15) + t.charAt(e >> a % 4 * 8 & 15);
return n
}
var o = "hanyastarsmkeyaa"
, s =
, c =
, u =
, d = function(e) {
return /string/gi.test(Object.prototype.toString.call(e)) || (e = JSON.stringify(e)),
unescape(encodeURIComponent(e)).split("").map((function(e) {
return e.charCodeAt()
}
))
}
, l = function(e, t) {
return e << t | e >>> 32 - t
}
, h = function(e) {
return s << 24 | s << 16 | s << 8 | s
}
, m = function(e) {
var t = h(e)
, n = t ^ l(t, 2) ^ l(t, 10) ^ l(t, 18) ^ l(t, 24);
return n
}
, p = function(e) {
var t = h(e)
, n = t ^ l(t, 13) ^ l(t, 23);
return n
}
, f = function(e) {
var t = []
, n = << 24 | e << 16 | e << 8 | e, e << 24 | e << 16 | e << 8 | e, e << 24 | e << 16 | e << 8 | e, e << 24 | e << 16 | e << 8 | e]
, a = new Array(36);
a = n ^ u,
a = n ^ u,
a = n ^ u,
a = n ^ u;
for (var i = 0; i < 32; i++)
a = a ^ p(a ^ a ^ a ^ c),
t = a;
return t
}
, v = 16
, g = function(e) {
var t = arguments.length > 1 && void 0 !== arguments ? arguments : 0
, n = << 24 | e << 16 | e << 8 | e, e << 24 | e << 16 | e << 8 | e, e << 24 | e << 16 | e << 8 | e, e << 24 | e << 16 | e << 8 | e];
return n
}
, b = function(e, t) {
var n = new Array(36);
e.forEach((function(e, t) {
return n = e
}
));
for (var a = 0; a < 32; a++)
n = n ^ m(n ^ n ^ n ^ t);
var i = , n, n, n];
return i
}
, w = function(e) {
if (null === e)
return null;
var t = v - e.length % v
, n = new Array(e.length + t);
return e.forEach((function(e, t) {
return n = e
}
)),
n.fill(t, e.length),
n
};
let base64js={};
!function(n){
n.byteLength = f;
n.toByteArray = i;
n.fromByteArray = p;
var u = [];
var v = [];
var d = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (var o = 0, a = t.length; o < a; ++o) {
u = t;
v = o
}
v["-".charCodeAt(0)] = 62;
v["_".charCodeAt(0)] = 63;
function c(r) {
var e = r.length;
if (e % 4 > 0) {
throw new Error("Invalid string. Length must be a multiple of 4")
}
var n = r.indexOf("=");
if (n === -1)
n = e;
var t = n === e ? 0 : 4 - n % 4;
return
}
function f(r) {
var e = c(r);
var n = e;
var t = e;
return (n + t) * 3 / 4 - t
}
function h(r, e, n) {
return (e + n) * 3 / 4 - n
}
function i(r) {
var e;
var n = c(r);
var t = n;
var o = n;
var a = new d(h(r, t, o));
var f = 0;
var i = o > 0 ? t - 4 : t;
var u;
for (u = 0; u < i; u += 4) {
e = v << 18 | v << 12 | v << 6 | v;
a = e >> 16 & 255;
a = e >> 8 & 255;
a = e & 255
}
if (o === 2) {
e = v << 2 | v >> 4;
a = e & 255
}
if (o === 1) {
e = v << 10 | v << 4 | v >> 2;
a = e >> 8 & 255;
a = e & 255
}
return a
}
function s(r) {
return u + u + u + u
}
function l(r, e, n) {
var t;
var o = [];
for (var a = e; a < n; a += 3) {
t = (r << 16 & 16711680) + (r << 8 & 65280) + (r & 255);
o.push(s(t))
}
return o.join("")
}
function p(r) {
var e;
var n = r.length;
var t = n % 3;
var o = [];
var a = 16383;
for (var f = 0, i = n - t; f < i; f += a) {
o.push(l(r, f, f + a > i ? i : f + a))
}
if (t === 1) {
e = r;
o.push(u + u + "==")
} else if (t === 2) {
e = (r << 8) + r;
o.push(u + u + u + "=")
}
return o.join("")
}
}(base64js)
function A(e, t) {
for (var n = arguments.length > 2 && void 0 !== arguments ? arguments : "base64", a = (o + "0000000000000000").slice(0, 16), i = f(d(a)), r = d(e), s = w(r), c = s.length / v, u = [], l = 0; l < c; l++)
for (var h = l * v, m = g(s, h), p = b(m, i), A = 0; A < v; A++)
u = p >> (3 - A) % 4 * 8 & 255;
return "base64" === n ? base64js.fromByteArray(u) : decodeURIComponent(escape(String.fromCharCode.apply(String, u)))
}
console.log(A({
"packageCode": "d8d843a863b040858ec1ff9ada8391c8",
"classCode": "e3a28e22986a4912aba8c21d999b9b3a",
"courseCode": "d8d843a863b040858ec1ff9ada8391c8",
"resCode": "a039b400f75e4b5f8f60e9ef5707c4a4",
"playTime": 2790,
"sectionCode": "69bc054b48fe455cb1a113b370cc9df7",
"userCode": "73c62367a8114fff83db8d656e01fd57",
"studyTimeDiff": 13,
"isStudyFinish": 0,
"city": "cbda7c8eecb211e9ad5d00163e08da4d",
"studyLimitTime": "",
"systemTime": 1660211914826
}));
***
请问这个js该怎么调用到易语言直接使用啊 https://jingyan.baidu.com/article/6525d4b110fe32ed7c2e94d1.html
但是精益模块我印象里用的js引擎是很老了(所以出现执行错误很可能要自己补)
很可能一些esnext的特性不支持...
如果有条件最好还是别用易语言了 李恒道 发表于 2022-8-11 21:04
https://jingyan.baidu.com/article/6525d4b110fe32ed7c2e94d1.html
但是精益模块我印象里用的js引擎是很老 ...
貌似是用的ie的引擎。。。。 王一之 发表于 2022-8-11 22:20
貌似是用的ie的引擎。。。。
我记着也是...
一个很老的微软实现
页:
[1]