mirror of
https://github.com/LinYuanovo/scripts.git
synced 2024-09-18 04:24:54 +08:00
青碳行
This commit is contained in:
parent
54d2dd7335
commit
42b7b711e6
10
qtx.js
10
qtx.js
@ -47,9 +47,9 @@
|
|||||||
else {
|
else {
|
||||||
|
|
||||||
|
|
||||||
console.log(`\n\n========================================= \n脚本执行 - 北京时间(UTC+8):${new Date(
|
console.log(`\n\n============================================= \n脚本执行 - 北京时间(UTC+8):${new Date(
|
||||||
new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 +
|
new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
8 * 60 * 60 * 1000).toLocaleString()} \n=========================================\n`);
|
8 * 60 * 60 * 1000).toLocaleString()} \n=============================================\n`);
|
||||||
|
|
||||||
await poem();
|
await poem();
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ function getNickName(timeout = 2 * 1000) {
|
|||||||
function randomInt(min, max) {
|
function randomInt(min, max) {
|
||||||
return Math.round(Math.random() * (max - min) + min)
|
return Math.round(Math.random() * (max - min) + min)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取随机诗词
|
* 获取随机诗词
|
||||||
*/
|
*/
|
||||||
@ -515,9 +515,9 @@ function poem(timeout = 3 * 1000) {
|
|||||||
$.get(url, async (err, resp, data) => {
|
$.get(url, async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data)
|
data = JSON.parse(data)
|
||||||
log(`${data.content} \n————《${data.origin}》${data.author}`);
|
console.log(`${data.content} \n————《${data.origin}》${data.author}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(e, resp);
|
console.log(e, resp);
|
||||||
} finally {
|
} finally {
|
||||||
resolve()
|
resolve()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user