You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
386 lines
50 KiB
386 lines
50 KiB
3 years ago
|
/*
|
||
|
|
||
|
安卓软件名称:快音
|
||
|
|
||
|
项目注册地址:https://landing.kaixinyf.cn/e30aze?invite_code=2S7B4S&_timestamp=1644398479&sign=15c82c2822432391d8402109a0762609&app_name=kuaiyin&device_id=1148692d61103e7c&client_v=5.03.03&platform=Android&platform_brand=blackshark&utm_source=xiaomi&um_from_appkey=5d91d0ed570df3d8ed000cb9&share_from=weixin&share_position=wuren
|
||
|
|
||
|
邀请码:2S7B4S或22F8Q3
|
||
|
|
||
|
声明:会有黑号还是黑设备的状态(账号异常),注册后登录上去自行提现0.3元,如果能提现到账就可以跑脚本,不能你跑了也没啥用,到最后也提现不了
|
||
|
|
||
|
==========================================
|
||
|
账号数据由3部分组成
|
||
|
device-id值&access-token值&refresh_token值
|
||
|
寻找方法:退出登录,开抓包,点微信登录成功后找 https://api.kaixinyf.cn/passport/UnionLogin 链接
|
||
|
注释: device-id值在请求头里面找,access-token值和refresh_token值在登录成功后 响应 里面找
|
||
|
==========================================
|
||
|
在脚本同级目录创建一个文件
|
||
|
文件名:soy_variable_data.js
|
||
|
soy_variable_data.js文件内容如下
|
||
|
|
||
|
//添加账号后需要在后面添加一个逗号(英文输入法的),
|
||
|
//最后一个账号后面是没有逗号的
|
||
|
//变量不能使用单引号引起
|
||
|
module.exports = {"code":200,
|
||
|
"variable_data":{
|
||
|
"kyin":[//这里是脚本标识,下面的 kyin 就是给快音脚本使用的标识
|
||
|
"123456",//这是第一个账号
|
||
|
"123456",//这是第二个账号
|
||
|
"123456"//这是第三个账号
|
||
|
]}
|
||
|
}
|
||
|
|
||
|
|
||
|
cron 0-59/10 6-20 * * *
|
||
|
|
||
|
脚本地址:https://gitee.com/soy-tool/app-script/raw/master/app_kyin.js
|
||
|
|
||
|
*/
|
||
|
|
||
|
|
||
|
const $ = new Env('【快音】版本:22.02.22.0');
|
||
|
// @grant require
|
||
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
||
|
|
||
|
|
||
|
var _0xodl='jsjiami.com.v6',_0xodl_=['_0xodl'],_0x4938=[_0xodl,'\x63\x72\x79\x70\x74\x6f\x2d\x6a\x73','\x69\x73\x4e\x6f\x64\x65','\x2e\x2f\x73\x6f\x79\x5f\x76\x61\x72\x69\x61\x62\x6c\x65\x5f\x64\x61\x74\x61\x2e\x6a\x73','\x6c\x6f\x67','\x0a\x3d\x3d\x3d\x20\u811a\u672c\u6267\u884c\x20\x2d\x20\u5317\u4eac\u65f6\u95f4\uff1a','\x67\x65\x74\x54\x69\x6d\x65','\x67\x65\x74\x54\x69\x6d\x65\x7a\x6f\x6e\x65\x4f\x66\x66\x73\x65\x74','\x74\x6f\x4c\x6f\x63\x61\x6c\x65\x53\x74\x72\x69\x6e\x67','\x20\x3d\x3d\x3d\x0a','\x3d\x3d\x3d\u3010\u5171\x20','\x76\x61\x72\x69\x61\x62\x6c\x65\x5f\x64\x61\x74\x61','\x6b\x79\x69\x6e','\x6c\x65\x6e\x67\x74\x68','\x20\u4e2a\u8d26\u53f7\u3011\x3d\x3d\x3d\x0a','\x63\x6f\x64\x65','\x0a\u3010\x73\x6f\x79\u811a\u672c\u63d0\u793a\u3011\uff1a\u8bf7\u52ff\u4e71\u4fee\u6539\u53d8\u91cf\u6587\u4ef6\u91cc\u9762\u5185\u5bb9','\x73\x70\x6c\x69\x74','\x0a\u3010\x73\x6f\x79\u811a\u672c\u63d0\u793a\u3011\uff1a\u586b\u5199\u53d8\u91cf\u683c\u5f0f\u4e0d\u89c4\u8303','\x69\x6e\x64\x65\x78','\x0a\u5f00\u59cb\u3010\u7b2c\x20','\x20\u4e2a\u8d26\u53f7\u4efb\u52a1\u3011','\x73\x65\x6e\x64\x4e\x6f\x74\x69\x66\x79','\x6e\x61\x6d\x65','\x63\x61\x74\x63\x68','\x6c\x6f\x67\x45\x72\x72','\x66\x69\x6e\x61\x6c\x6c\x79','\x64\x6f\x6e\x65','\x67\x65\x74\x48\x6f\x75\x72\x73','\x67\x65\x74\x4d\x69\x6e\x75\x74\x65\x73','\x73\x69\x67\x6e\x5f\x69\x6e\x5f\x61\x70\x70\x5f\x78\x5f\x76\x69\x64\x65\x6f','\x68\x6f\x6d\x65\x2f\x54\x69\x6d\x65\x32\x52\x65\x77\x61\x72\x64','\x74\x3d\x31\x36\x34\x34\x35\x37\x31\x30\x34\x31\x33\x30\x31\x26\x73\x3d\x61\x70\x70\x6c\x65\x25\x37\x43\x31\x45\x31\x33\x32\x44\x31\x36\x38\x35\x42\x35\x30\x37\x35\x42\x43\x36\x39\x41\x36\x38\x43\x39\x37\x41\x34\x44\x36\x37\x31\x42\x39\x41\x43\x34\x46\x31\x36\x37\x35\x46\x38\x46\x39\x33\x41\x34\x39\x45\x31\x45\x32\x43\x43\x44\x45\x39\x45\x39\x42\x37\x36\x30','\x70\x6f\x73\x74','\x0a\u3010\x73\x6f\x79\u811a\u672c\u63d0\u793a\x2d\x2d\x2d\u8d26\u53f7\x20','\x20\u6574\u70b9\u7ea2\u5305\u3011\x3a\x20\u7f51\u7edc\u8bf7\u6c42\u5931\u8d25','\x70\x61\x72\x73\x65','\x20\u6574\u70b9\u7ea2\u5305\u3011\x3a\x20','\x6d\x65\x73\x73\x61\x67\x65','\x53\x65\x6e\x64\x43\x6f\x69\x6e','\x6d\x6f\x64\x65\x3d\x6d\x75\x73\x69\x63\x26\x6c\x65\x76\x65\x6c\x3d\x33\x35\x26\x75\x73\x65\x64\x5f\x66\x61\x73\x74\x5f\x74\x69\x6d\x65\x3d\x30\x26\x70\x6c\x61\x74\x66\x6f\x72\x6d\x3d\x41\x6e\x64\x72\x6f\x69\x64\x26\x63\x6c\x69\x65\x6e\x74\x5f\x76\x3d\x35\x2e\x30\x33\x2e\x30\x33\x26\x61\x70\x70\x5f\x76\x3d\x35\x2e\x30\x33\x2e\x30\x33\x26\x74\x3d\x31\x36\x34\x35\x34\x34\x38\x34\x33\x31\x39\x31\x32\x26\x73\x3d\x67\x72\x61\x70\x65\x25\x37\x43\x33\x35\x44\x46\x38\x39\x42\x45\x31\x34\x30\x35\x43\x34\x41\x36\x36\x43\x34\x46\x41\x30\x46\x46\x44\x41\x35\x42\x38\x45\x30\x34\x39\x37\x39\x39\x35\x36\x34\x38\x31\x39\x45\x39\x33\x42\x30\x46\x43\x33\x42\x44\x36\x39\x31\x31\x38\x45\x45\x41\x32\x35\x46\x35','\x20\u5237\u65f6\u957f\u3011\x3a\x20\u7f51\u7edc\u8bf7\u6c42\u5931\u8d25','\x64\x61\x74\x61','\x74\x79\x70\x65','\x67\x6f\x6c\x64\x5f\x65\x67\x67','\u5408\u4e00\u91d1\u86cb','\x20\u5237\u65f6\u957f\u3011\x3a\x20\u83b7\u5f97\x20','\x63\x6f\x69\x6e','\x20\u91d1\u5e01','\x20\u5237\u65f6\u957f\u3011\x3a\x20','\x4f\x70\x65\x6e\x47\x6f\x6c\x64\x45\x67\x67','\x6d\x6f\x64\x65\x3d\x6d\x75\x73\x69\x63\x26\x70\x6c\x61\x74\x66\x6f\x72\x6d\x3d\x41\x6e\x64\x72\x6f\x69\x64\x26\x63\x6c\x69\x65\x6e\x74\x5f\x76\x3d\x35\x2e\x30\x33\x2e\x30\x33\x26\x61\x70\x70\x5f\x76\x3d\x35\x2e\x30\x33\x2e\x30\x33\x26\x74\x3d\x31\x36\x34\x35\x34\x34\x37\x32\x36\x32\x30\x32\x34\x26\x73\x3d\x61\x70\x70\x6c\x65\x25\x37\x43\x42\x43\x43\x36\x42\x36\x41\x44\x36\x46\x41\x45\x31\x32\x45\x36\x36\x37\x39\x42\x38\x45\x30\x42\x33\x30\x36\x35\x38\x30\x30\x30\x37\x35\x45\x37\x35\x34\x44\x45\x41\x39\x43\x41\x36\x42\x31\x36\x31\x31\x35\x46\x38\x43\x30\x42\x42\x37\x42\x39\x37\x33\x46\x35','\x20\u91d1\u86cb\u5956\u52b1\u3011\x3a\x20\u7f51\u7edc\u8bf7\u6c42\u5931\u8d25','\x72\x65\x77\x61\x72\x64\x5f\x6c\x69\x73\x74','\x74\x61\x73\x6b\x5f\x69\x64','\x20\u91d1\u86cb\u5956\u52b1\u3011\x3a\x20','\x44\x72\x61\x77\x4c\x6f\x74\x74\x65\x72\x79','\x74\x61\x73\x6b\x5f\x69\x64\x3d','\x26\x74
|
||
|
|
||
|
|
||
|
function Env(t, e) {
|
||
|
class s {
|
||
|
constructor(t) {
|
||
|
this.env = t
|
||
|
}
|
||
|
send(t, e = "GET") {
|
||
|
t = "string" == typeof t ? {
|
||
|
url: t
|
||
|
} : t;
|
||
|
let s = this.get;
|
||
|
return "POST" === e && (s = this.post), new Promise((e, i) => {
|
||
|
s.call(this, t, (t, s, r) => {
|
||
|
t ? i(t) : e(s)
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
get(t) {
|
||
|
return this.send.call(this.env, t)
|
||
|
}
|
||
|
post(t) {
|
||
|
return this.send.call(this.env, t, "POST")
|
||
|
}
|
||
|
}
|
||
|
return new class {
|
||
|
constructor(t, e) {
|
||
|
this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`)
|
||
|
}
|
||
|
isNode() {
|
||
|
return "undefined" != typeof module && !!module.exports
|
||
|
}
|
||
|
isQuanX() {
|
||
|
return "undefined" != typeof $task
|
||
|
}
|
||
|
isSurge() {
|
||
|
return "undefined" != typeof $httpClient && "undefined" == typeof $loon
|
||
|
}
|
||
|
isLoon() {
|
||
|
return "undefined" != typeof $loon
|
||
|
}
|
||
|
toObj(t, e = null) {
|
||
|
try {
|
||
|
return JSON.parse(t)
|
||
|
} catch {
|
||
|
return e
|
||
|
}
|
||
|
}
|
||
|
toStr(t, e = null) {
|
||
|
try {
|
||
|
return JSON.stringify(t)
|
||
|
} catch {
|
||
|
return e
|
||
|
}
|
||
|
}
|
||
|
getjson(t, e) {
|
||
|
let s = e;
|
||
|
const i = this.getdata(t);
|
||
|
if (i) try {
|
||
|
s = JSON.parse(this.getdata(t))
|
||
|
} catch {}
|
||
|
return s
|
||
|
}
|
||
|
setjson(t, e) {
|
||
|
try {
|
||
|
return this.setdata(JSON.stringify(t), e)
|
||
|
} catch {
|
||
|
return !1
|
||
|
}
|
||
|
}
|
||
|
getScript(t) {
|
||
|
return new Promise(e => {
|
||
|
this.get({
|
||
|
url: t
|
||
|
}, (t, s, i) => e(i))
|
||
|
})
|
||
|
}
|
||
|
runScript(t, e) {
|
||
|
return new Promise(s => {
|
||
|
let i = this.getdata("@chavy_boxjs_userCfgs.httpapi");
|
||
|
i = i ? i.replace(/\n/g, "").trim() : i;
|
||
|
let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");
|
||
|
r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r;
|
||
|
const [o, h] = i.split("@"), a = {
|
||
|
url: `http://${h}/v1/scripting/evaluate`,
|
||
|
body: {
|
||
|
script_text: t,
|
||
|
mock_type: "cron",
|
||
|
timeout: r
|
||
|
},
|
||
|
headers: {
|
||
|
"X-Key": o,
|
||
|
Accept: "*/*"
|
||
|
}
|
||
|
};
|
||
|
this.post(a, (t, e, i) => s(i))
|
||
|
}).catch(t => this.logErr(t))
|
||
|
}
|
||
|
loaddata() {
|
||
|
if (!this.isNode()) return {}; {
|
||
|
this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
|
||
|
const t = this.path.resolve(this.dataFile),
|
||
|
e = this.path.resolve(process.cwd(), this.dataFile),
|
||
|
s = this.fs.existsSync(t),
|
||
|
i = !s && this.fs.existsSync(e);
|
||
|
if (!s && !i) return {}; {
|
||
|
const i = s ? t : e;
|
||
|
try {
|
||
|
return JSON.parse(this.fs.readFileSync(i))
|
||
|
} catch (t) {
|
||
|
return {}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
writedata() {
|
||
|
if (this.isNode()) {
|
||
|
this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
|
||
|
const t = this.path.resolve(this.dataFile),
|
||
|
e = this.path.resolve(process.cwd(), this.dataFile),
|
||
|
s = this.fs.existsSync(t),
|
||
|
i = !s && this.fs.existsSync(e),
|
||
|
r = JSON.stringify(this.data);
|
||
|
s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r)
|
||
|
}
|
||
|
}
|
||
|
lodash_get(t, e, s) {
|
||
|
const i = e.replace(/\[(\d+)\]/g, ".$1").split(".");
|
||
|
let r = t;
|
||
|
for (const t of i)
|
||
|
if (r = Object(r)[t], void 0 === r) return s;
|
||
|
return r
|
||
|
}
|
||
|
lodash_set(t, e, s) {
|
||
|
return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t)
|
||
|
}
|
||
|
getdata(t) {
|
||
|
let e = this.getval(t);
|
||
|
if (/^@/.test(t)) {
|
||
|
const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : "";
|
||
|
if (r) try {
|
||
|
const t = JSON.parse(r);
|
||
|
e = t ? this.lodash_get(t, i, "") : e
|
||
|
} catch (t) {
|
||
|
e = ""
|
||
|
}
|
||
|
}
|
||
|
return e
|
||
|
}
|
||
|
setdata(t, e) {
|
||
|
let s = !1;
|
||
|
if (/^@/.test(e)) {
|
||
|
const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}";
|
||
|
try {
|
||
|
const e = JSON.parse(h);
|
||
|
this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i)
|
||
|
} catch (e) {
|
||
|
const o = {};
|
||
|
this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i)
|
||
|
}
|
||
|
} else s = this.setval(t, e);
|
||
|
return s
|
||
|
}
|
||
|
getval(t) {
|
||
|
return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null
|
||
|
}
|
||
|
setval(t, e) {
|
||
|
return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null
|
||
|
}
|
||
|
initGotEnv(t) {
|
||
|
this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar))
|
||
|
}
|
||
|
get(t, e = (() => {})) {
|
||
|
t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {
|
||
|
"X-Surge-Skip-Scripting": !1
|
||
|
})), $httpClient.get(t, (t, s, i) => {
|
||
|
!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
|
||
|
})) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {
|
||
|
hints: !1
|
||
|
})), $task.fetch(t).then(t => {
|
||
|
const {
|
||
|
statusCode: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
} = t;
|
||
|
e(null, {
|
||
|
status: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
}, o)
|
||
|
}, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => {
|
||
|
try {
|
||
|
if (t.headers["set-cookie"]) {
|
||
|
const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();
|
||
|
this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar
|
||
|
}
|
||
|
} catch (t) {
|
||
|
this.logErr(t)
|
||
|
}
|
||
|
}).then(t => {
|
||
|
const {
|
||
|
statusCode: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
} = t;
|
||
|
e(null, {
|
||
|
status: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
}, o)
|
||
|
}, t => {
|
||
|
const {
|
||
|
message: s,
|
||
|
response: i
|
||
|
} = t;
|
||
|
e(s, i, i && i.body)
|
||
|
}))
|
||
|
}
|
||
|
post(t, e = (() => {})) {
|
||
|
if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {
|
||
|
"X-Surge-Skip-Scripting": !1
|
||
|
})), $httpClient.post(t, (t, s, i) => {
|
||
|
!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
|
||
|
});
|
||
|
else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {
|
||
|
hints: !1
|
||
|
})), $task.fetch(t).then(t => {
|
||
|
const {
|
||
|
statusCode: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
} = t;
|
||
|
e(null, {
|
||
|
status: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
}, o)
|
||
|
}, t => e(t));
|
||
|
else if (this.isNode()) {
|
||
|
this.initGotEnv(t);
|
||
|
const {
|
||
|
url: s,
|
||
|
...i
|
||
|
} = t;
|
||
|
this.got.post(s, i).then(t => {
|
||
|
const {
|
||
|
statusCode: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
} = t;
|
||
|
e(null, {
|
||
|
status: s,
|
||
|
statusCode: i,
|
||
|
headers: r,
|
||
|
body: o
|
||
|
}, o)
|
||
|
}, t => {
|
||
|
const {
|
||
|
message: s,
|
||
|
response: i
|
||
|
} = t;
|
||
|
e(s, i, i && i.body)
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
time(t) {
|
||
|
let e = {
|
||
|
"M+": (new Date).getMonth() + 1,
|
||
|
"d+": (new Date).getDate(),
|
||
|
"H+": (new Date).getHours(),
|
||
|
"m+": (new Date).getMinutes(),
|
||
|
"s+": (new Date).getSeconds(),
|
||
|
"q+": Math.floor(((new Date).getMonth() + 3) / 3),
|
||
|
S: (new Date).getMilliseconds()
|
||
|
};
|
||
|
/(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length)));
|
||
|
for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length)));
|
||
|
return t
|
||
|
}
|
||
|
msg(e = t, s = "", i = "", r) {
|
||
|
const o = t => {
|
||
|
if (!t) return t;
|
||
|
if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {
|
||
|
"open-url": t
|
||
|
} : this.isSurge() ? {
|
||
|
url: t
|
||
|
} : void 0;
|
||
|
if ("object" == typeof t) {
|
||
|
if (this.isLoon()) {
|
||
|
let e = t.openUrl || t.url || t["open-url"],
|
||
|
s = t.mediaUrl || t["media-url"];
|
||
|
return {
|
||
|
openUrl: e,
|
||
|
mediaUrl: s
|
||
|
}
|
||
|
}
|
||
|
if (this.isQuanX()) {
|
||
|
let e = t["open-url"] || t.url || t.openUrl,
|
||
|
s = t["media-url"] || t.mediaUrl;
|
||
|
return {
|
||
|
"open-url": e,
|
||
|
"media-url": s
|
||
|
}
|
||
|
}
|
||
|
if (this.isSurge()) {
|
||
|
let e = t.url || t.openUrl || t["open-url"];
|
||
|
return {
|
||
|
url: e
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r)));
|
||
|
let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];
|
||
|
h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h)
|
||
|
}
|
||
|
log(...t) {
|
||
|
t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))
|
||
|
}
|
||
|
logErr(t, e) {
|
||
|
const s = !this.isSurge() && !this.isQuanX() && !this.isLoon();
|
||
|
s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t)
|
||
|
}
|
||
|
wait(t) {
|
||
|
return new Promise(e => setTimeout(e, t))
|
||
|
}
|
||
|
done(t = {}) {
|
||
|
const e = (new Date).getTime(),
|
||
|
s = (e - this.startTime) / 1e3;
|
||
|
this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t)
|
||
|
}
|
||
|
}(t, e)
|
||
|
}
|