mirror of https://github.com/6dylan6/jdpro.git
11 lines
39 KiB
JavaScript
11 lines
39 KiB
JavaScript
|
/*
|
|||
|
服装抽奖
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_clothing_draw.js, tag=服装抽奖
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('服装抽奖')
|
|||
|
var iil='jsjiami.com.v7';const iIiI1=iii1II;function Iii11l(){const IIIII1=(function(){return[...[iil,'MjrrsHfjDJMiPEaJCYmWiR.ScolmFM.v7IpCffqk==','zH57f8kvDq','BWVcMCoL','W6v4pConqhVdL8opW5dcSd7dQvpdGSo4gG','W7dcT03cJCkZ','5OQp5AsS5AEC6lAmW6C','5Aw35y6j5A+C5lQ777695lI65Pwd5OIr5P2/5lUp5yMi6ykI5BEB57Qr5AYu5OQo7768','W7JdPMGSaSo/','6lsL5y6T5Pw45Pwg','W4RcLIKibg3dGIuxsmk8ASk8sCkHwwquDW','ESkiWP7cLmkQELH9gsbTW5W','q8kqW6FdLSol','W5NcQ25/Eq','WQddUCkhW605','WOlcPmkwWOZdGvqsrZNdTYq3','WQa0zG','W7xdHhhdJMHw','x2vEfSoLjsHQW5tdIa','Bh/dN03cOq','W7JcL0dcISkv','kYJdKda','WOTHxrnW','hd3dIYhdKmkIW4jbWRXSo8kH','W6BcQ1jOzq','WRD5qtj0WR43xv3dPSoJsa','u8kyW6ldLSoF','W7BcJsO','WP9stmoYnq','WQJdQmkrW5q','A2xdG1tcL8kqtHO','rZzspq','hmoqha','WP02WRRdTa','W5/cNKf4ya','Dq9beSkjC8oetLRdOSoqWO8','W6FcP1dcSa','WPNdHKmsDMxdJuuBWRHcw8k+WQ0','W5NcLdmfhwK','W67dVw0IaSojWP0Gfq','5A+H5OMd5lM+5yQZ5Aw26lwrtG','p8kGCmkiA1P2','rJnb','hqxcOSoHgq','w8kIW5NdH8oq','5A2V5OUe5lI55yMm5AAd6lsAEG','WPhcSudcKg/cHNhcSghcR8ovCG','4P68WRNMNk7OG4BMR4BNOyBLP7BNK7ZcVG','amoneGhcHa','C2yLthxdOmk9','tsXjg8og','pM8lwa','vHVcMCoi','WPNcNCo+W4jW','xZNcQ8otja','WPhcMmo2W69j','W47dVSkn','hsBdTNO','qmkgWPNcS8kmAvr+','dcpdKxm0hY4CW7ZcSa','o2NcRt8om8kBW7FdLSovW5C','WPXKWOK','bmoEcbdcSMBdRL3dUwyOW7pdOG','wZvvha','lIqom8k7pq','DwVdMG','pZpcQCod','A8krWOtcIW','jsNcS8of','FSkPtq','WOhdIeqnqhJdGxqqWRX5sSk3','EbbY','l+ACH+wiLUEkRUAdUEAULow4N++9UoA2OowkIEIoOownMEAjQowlTq','W7pcJs13W6xcQWngWOpcHSo5W6nlWRuoWRuSW4S','nxqBtCklW5/cItizumkmCrTRWQ/cP8kepSkVxNZdRW5WyCkKWPJcM8o9cmoPW6dcK8oSW57dVCoaW6VdIh0fvSk5pW','W6/cKdb5W6u','5P6i6k6X5lM+5yQZ5Aw26lwrtG','WQONhmoywNZdOmkfW7BcTdxdOa','W6VcGYPOW5pcTG95WOhcGmoeW7Hj','CSkvW43dOSo3uCkd','zWxcIG','yWFcUSomd2RdGbtcLb/cU8kIWP9k','ENO/A3xdRCkJ','ydxdVgS','BCkcDCkRw35LWR/cRMyOmvFdQZrEwINdKa','yb3cUSo+bNNdNG','WR3cLCoU','jZmso8k9','W7pdKgZdOfjBrwvu','W4pdO8oYpve','WPpcPSkRWPFdL3yIrYddPq','W5JcRmoeWPqk','EqXY','lf3cVSo4sW','cIu9tSkMELn3W53dMCkgtvq','WQddPSkrW4eMmhSOW67dGmkCcmojW53cRYTvWOi','W74hEK7cImodW6u','FhXtnmos','WRNdMmkzvSkK','CXPHp8kBBmoTvf3dL8ojWPVcS8o5W67cIKq6fG','Dq9Mn8kvtmoPvei','W7RcT1dcQ8ktvN4','W5dcHSop','W7hdTXFdKWBdUNxcKNRcKSobtW','W7xcLKVcJCk+','WRTNWQHsAq','W73cNu15BG','WO7cTCkY','WPpdVMPCW4K','W5ZdMCo3wa','dcpdTLyOiamgW6q','EbbHb8kFASoXzehdT8oxWOJcGmoV','W5hcRri7aG','W6hdUr7dLtS','otpcTmoznCofW4ddGvOrW43dPgKKW7ldQCkdWRu','WRyVD1BcPq','W7pdQNCRbSoQWP0','mJmjlSkQ','Dq9beSkjC8omqL3dT8oqWOC','x+ADKEwjOEEiM+AbKEw+TEw6GE++GoIVJoAISUADGoE/NoE7M+AzRUwsNoAVPEw7LSoA','l2GRu8oogSojc3xdOCkTsq','WQBcSCkWWPxdNa','W6lcPSkqW4eQlNfkW53dHSkwbmolW4VcTcPrWPVcRSo2pqrmd1NcKCk1','amoneGhcHf3dOL/dVW','uu7dVHyl','W4/cPuzcDa','W4XJWQVdSru','WO/cU8kL','jt3cSSompCoeW73dRu8t','iYBdKcxdQSkCW5r2WQbOj8k7W7v2','WRD5qtj7WRKQuvZdUG'],...(function(){return[...['W4yVW7aaW5pdP8ox','WPtcTCkRWPK','W7RcSY4rWO8cW5JLV7RLPzxJGQ/KUPJKUlBOT5RLJye','W7ZdOSoDzmks','WRLuWPzjvW','W4WzW6qiW4KRWR0M','WPD+WObYAu3dVSkxy1a','f8oAdZpdLhRdRW','rMxdK30','5P+r6kY45lM65yIp5AAj6lsJW7a','xa1tmSkQBCoU','W5RdLCoJa10IWODWvmoRrrtdReRcHWtdGCk1WRy','swxdKa','6lYx5yES6AwZ6Aoa5AwY6lwNlG','W4RcHqKaaw/dUIubtW','Ad/dOx0','AHRcNCoOa8otW4FcVSkmoYyLBY/dQ8opbIX3W5VcGvfScaubWP/dLbLBWRxdS8oy','WRD5qtjHWR82q3RdP8oYqmoj','imkXE8o8gCodwG','W7BdQMu8aSo/WOS','W4G9W6OPW7y','ibRcR8ojfa','WP8pueBcGG','6lEQ5y2+5Psf5PE9','laSzhSkc','WPVdJNrkW68','W4NcR8ohWPW/','WRJdQmkwW54xo3ia','juSKrmoklmk8A2JdGCoUWO7cJG','WPLJWPPRAr/cN8oDDKyMW6ije8kshNmKASkeWRddRCkL','WQmJpmojwI3cI8opW6pcPtxcOLlcN8onnKtdGCo0lWldUmoAgW','W5RdHSodc1GGWR9WqSoS','zSkizG','iMxcSW','4P2NyoACJoIcIEAVL+EJSUwKGoEtTsK','8kslUmkL','aSofiHtcQW','bSoToIlcPW','rmkOW6JdLmoDt8kOB1BcTG','WP/dSmkoya','WOD3xSoLla','oYJdLZRdI8kbW7LCWQvSoG','oapdGINdVa','WP3dT8krACkv','yb5MgmkPD8o9vuRdS8oSWPNcIq','W5FdMCoW','iJRdGW','xbVcGmom','vt7cJSkdcfpdOmot','W6JcNd4Uea','iZe0nCk8pLDTWQSFW67cGW','AhNdJYmQsCoOW6/dT8k9','Cmk1tSo4','it3cS8oga8oyW4ZdVLGxW7ddV2S','C8kjW5ddI8ou','WRZdU8kmW48Mc3yaW6ldKa','W6pcRZWxmW','zuafu8ofW7hdM8kHw8kfWQ0O','F8k1tq','x2vEfSoLjsbMW5pdNCkQAa','kweCvSo1WP/dSJGBuCkA','uXxdKvH0','y8kUDCoTmSo9','WOFcU8kSWOG','WQONo8o9rKpdHCktW6K','WQVdS8klz8k+','5AYB5OUc5lUy5yM
|
|||
|
// prettier-ignore
|
|||
|
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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("", `🔔${this.name}, 开始!`) } 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("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (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.d
|