jd_joy_run.js

This commit is contained in:
lxk0301
2021-02-18 15:50:21 +08:00
parent 94d1b4da86
commit f58cfc2516

View File

@ -124,15 +124,15 @@ async function getToken() {
count ++; count ++;
console.log(`count: ${count}`) console.log(`count: ${count}`)
$.setdata(`${count}`, 'countFlag'); $.setdata(`${count}`, 'countFlag');
if ($.getdata('countFlag') * 1 >= 2) { if ($.getdata('countFlag') * 1 >= 3) {
count = 0; count = 0;
$.setdata(`${count}`, 'countFlag'); $.setdata(`${count}`, 'countFlag');
$.msg($.name, '更新Token: 成功🎉', ``); $.msg($.name, '更新Token: 成功🎉', ``);
console.log(`开始上传Token`) console.log(`开始上传Token${LKYLToken}\n`)
await $.http.get({url: `http://jd.turinglabs.net/api/v2/jd/joy/create/${LKYLToken}/`}).then((resp) => { await $.http.get({url: `http://jd.turinglabs.net/api/v2/jd/joy/create/${LKYLToken}/`}).then((resp) => {
if (resp.statusCode === 200) { if (resp.statusCode === 200) {
let { body } = resp; let { body } = resp;
console.log(`Token提交结果:${body}`) console.log(`Token提交结果:${body}\n`)
body = JSON.parse(body); body = JSON.parse(body);
console.log(`${body.message}`) console.log(`${body.message}`)
} }