mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2025-12-17 23:35:02 +08:00
修复通知
This commit is contained in:
@@ -168,7 +168,7 @@ class Task extends Public {
|
|||||||
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => console.log(e))
|
.catch((e) => console.log(e))
|
||||||
.finally(() => $.done());
|
.finally(async() => await $.done());
|
||||||
|
|
||||||
async function getNotice() {
|
async function getNotice() {
|
||||||
let options = {
|
let options = {
|
||||||
@@ -206,19 +206,14 @@ function Env(t, s) {
|
|||||||
async sendMsg() {
|
async sendMsg() {
|
||||||
this.log("==============📣Center 通知📣==============")
|
this.log("==============📣Center 通知📣==============")
|
||||||
for (let item of this.notifyStr) {
|
for (let item of this.notifyStr) {
|
||||||
if (Object.prototype.toString.call(item) === '[object Object]') {
|
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') {
|
||||||
item = JSON.stringify(item)
|
|
||||||
}
|
|
||||||
if (Object.prototype.toString.call(arg) === '[object Array]') {
|
|
||||||
item = JSON.stringify(item)
|
item = JSON.stringify(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let message = this.notifyStr.join(this.logSeparator);
|
let message = this.notifyStr.join(this.logSeparator);
|
||||||
if (this.isNode()) {
|
if (this.isNode()) {
|
||||||
|
|
||||||
await notify.sendNotify(this.name, message);
|
await notify.sendNotify(this.name, message);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNode() {
|
isNode() {
|
||||||
@@ -320,8 +315,8 @@ function Env(t, s) {
|
|||||||
wait(t) {
|
wait(t) {
|
||||||
return new Promise((s) => setTimeout(s, t));
|
return new Promise((s) => setTimeout(s, t));
|
||||||
}
|
}
|
||||||
done(t = {}) {
|
async done(t = {}) {
|
||||||
this.sendMsg();
|
await this.sendMsg();
|
||||||
const s = new Date().getTime(),
|
const s = new Date().getTime(),
|
||||||
e = (s - this.startTime) / 1e3;
|
e = (s - this.startTime) / 1e3;
|
||||||
this.log(
|
this.log(
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ class Task extends Public {
|
|||||||
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => console.log(e))
|
.catch((e) => console.log(e))
|
||||||
.finally(() => $.done());
|
.finally(async() => await $.done());
|
||||||
|
|
||||||
async function getNotice() {
|
async function getNotice() {
|
||||||
let options = {
|
let options = {
|
||||||
@@ -249,19 +249,14 @@ function Env(t, s) {
|
|||||||
async sendMsg() {
|
async sendMsg() {
|
||||||
this.log("==============📣Center 通知📣==============")
|
this.log("==============📣Center 通知📣==============")
|
||||||
for (let item of this.notifyStr) {
|
for (let item of this.notifyStr) {
|
||||||
if (Object.prototype.toString.call(item) === '[object Object]') {
|
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') {
|
||||||
item = JSON.stringify(item)
|
|
||||||
}
|
|
||||||
if (Object.prototype.toString.call(arg) === '[object Array]') {
|
|
||||||
item = JSON.stringify(item)
|
item = JSON.stringify(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let message = this.notifyStr.join(this.logSeparator);
|
let message = this.notifyStr.join(this.logSeparator);
|
||||||
if (this.isNode()) {
|
if (this.isNode()) {
|
||||||
|
|
||||||
await notify.sendNotify(this.name, message);
|
await notify.sendNotify(this.name, message);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNode() {
|
isNode() {
|
||||||
@@ -363,8 +358,8 @@ function Env(t, s) {
|
|||||||
wait(t) {
|
wait(t) {
|
||||||
return new Promise((s) => setTimeout(s, t));
|
return new Promise((s) => setTimeout(s, t));
|
||||||
}
|
}
|
||||||
done(t = {}) {
|
async done(t = {}) {
|
||||||
this.sendMsg();
|
await this.sendMsg();
|
||||||
const s = new Date().getTime(),
|
const s = new Date().getTime(),
|
||||||
e = (s - this.startTime) / 1e3;
|
e = (s - this.startTime) / 1e3;
|
||||||
this.log(
|
this.log(
|
||||||
|
|||||||
13
wxapp/hdl.js
13
wxapp/hdl.js
@@ -152,7 +152,7 @@ class Task extends Public {
|
|||||||
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => console.log(e))
|
.catch((e) => console.log(e))
|
||||||
.finally(() => $.done());
|
.finally(async () => await $.done());
|
||||||
|
|
||||||
async function getNotice() {
|
async function getNotice() {
|
||||||
let options = {
|
let options = {
|
||||||
@@ -190,19 +190,14 @@ function Env(t, s) {
|
|||||||
async sendMsg() {
|
async sendMsg() {
|
||||||
this.log("==============📣Center 通知📣==============")
|
this.log("==============📣Center 通知📣==============")
|
||||||
for (let item of this.notifyStr) {
|
for (let item of this.notifyStr) {
|
||||||
if (Object.prototype.toString.call(item) === '[object Object]') {
|
if (Object.prototype.toString.call(item) === '[object Object]' || Object.prototype.toString.call(item) === '[object Array]') {
|
||||||
item = JSON.stringify(item)
|
|
||||||
}
|
|
||||||
if (Object.prototype.toString.call(arg) === '[object Array]') {
|
|
||||||
item = JSON.stringify(item)
|
item = JSON.stringify(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let message = this.notifyStr.join(this.logSeparator);
|
let message = this.notifyStr.join(this.logSeparator);
|
||||||
if (this.isNode()) {
|
if (this.isNode()) {
|
||||||
|
|
||||||
await notify.sendNotify(this.name, message);
|
await notify.sendNotify(this.name, message);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNode() {
|
isNode() {
|
||||||
@@ -304,8 +299,8 @@ function Env(t, s) {
|
|||||||
wait(t) {
|
wait(t) {
|
||||||
return new Promise((s) => setTimeout(s, t));
|
return new Promise((s) => setTimeout(s, t));
|
||||||
}
|
}
|
||||||
done(t = {}) {
|
async done(t = {}) {
|
||||||
this.sendMsg();
|
await this.sendMsg();
|
||||||
const s = new Date().getTime(),
|
const s = new Date().getTime(),
|
||||||
e = (s - this.startTime) / 1e3;
|
e = (s - this.startTime) / 1e3;
|
||||||
this.log(
|
this.log(
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class Task extends Public {
|
|||||||
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => console.log(e))
|
.catch((e) => console.log(e))
|
||||||
.finally(() => $.done());
|
.finally(async () => await $.done());
|
||||||
|
|
||||||
async function getNotice() {
|
async function getNotice() {
|
||||||
let options = {
|
let options = {
|
||||||
@@ -165,19 +165,14 @@ function Env(t, s) {
|
|||||||
async sendMsg() {
|
async sendMsg() {
|
||||||
this.log("==============📣Center 通知📣==============")
|
this.log("==============📣Center 通知📣==============")
|
||||||
for (let item of this.notifyStr) {
|
for (let item of this.notifyStr) {
|
||||||
if (Object.prototype.toString.call(item) === '[object Object]') {
|
if (Object.prototype.toString.call(item) === '[object Object]' || Object.prototype.toString.call(item) === '[object Array]') {
|
||||||
item = JSON.stringify(item)
|
|
||||||
}
|
|
||||||
if (Object.prototype.toString.call(arg) === '[object Array]') {
|
|
||||||
item = JSON.stringify(item)
|
item = JSON.stringify(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let message = this.notifyStr.join(this.logSeparator);
|
let message = this.notifyStr.join(this.logSeparator);
|
||||||
if (this.isNode()) {
|
if (this.isNode()) {
|
||||||
|
|
||||||
await notify.sendNotify(this.name, message);
|
await notify.sendNotify(this.name, message);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNode() {
|
isNode() {
|
||||||
@@ -279,8 +274,8 @@ function Env(t, s) {
|
|||||||
wait(t) {
|
wait(t) {
|
||||||
return new Promise((s) => setTimeout(s, t));
|
return new Promise((s) => setTimeout(s, t));
|
||||||
}
|
}
|
||||||
done(t = {}) {
|
async done(t = {}) {
|
||||||
this.sendMsg();
|
await this.sendMsg();
|
||||||
const s = new Date().getTime(),
|
const s = new Date().getTime(),
|
||||||
e = (s - this.startTime) / 1e3;
|
e = (s - this.startTime) / 1e3;
|
||||||
this.log(
|
this.log(
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class Task extends Public {
|
|||||||
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => console.log(e))
|
.catch((e) => console.log(e))
|
||||||
.finally(() => $.done());
|
.finally(async () => await $.done());
|
||||||
|
|
||||||
async function getNotice() {
|
async function getNotice() {
|
||||||
let options = {
|
let options = {
|
||||||
@@ -168,19 +168,14 @@ function Env(t, s) {
|
|||||||
async sendMsg() {
|
async sendMsg() {
|
||||||
this.log("==============📣Center 通知📣==============")
|
this.log("==============📣Center 通知📣==============")
|
||||||
for (let item of this.notifyStr) {
|
for (let item of this.notifyStr) {
|
||||||
if (Object.prototype.toString.call(item) === '[object Object]') {
|
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') {
|
||||||
item = JSON.stringify(item)
|
|
||||||
}
|
|
||||||
if (Object.prototype.toString.call(arg) === '[object Array]') {
|
|
||||||
item = JSON.stringify(item)
|
item = JSON.stringify(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let message = this.notifyStr.join(this.logSeparator);
|
let message = this.notifyStr.join(this.logSeparator);
|
||||||
if (this.isNode()) {
|
if (this.isNode()) {
|
||||||
|
|
||||||
await notify.sendNotify(this.name, message);
|
await notify.sendNotify(this.name, message);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNode() {
|
isNode() {
|
||||||
@@ -282,8 +277,8 @@ function Env(t, s) {
|
|||||||
wait(t) {
|
wait(t) {
|
||||||
return new Promise((s) => setTimeout(s, t));
|
return new Promise((s) => setTimeout(s, t));
|
||||||
}
|
}
|
||||||
done(t = {}) {
|
async done(t = {}) {
|
||||||
this.sendMsg();
|
await this.sendMsg();
|
||||||
const s = new Date().getTime(),
|
const s = new Date().getTime(),
|
||||||
e = (s - this.startTime) / 1e3;
|
e = (s - this.startTime) / 1e3;
|
||||||
this.log(
|
this.log(
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class Task extends Public {
|
|||||||
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => console.log(e))
|
.catch((e) => console.log(e))
|
||||||
.finally(() => $.done());
|
.finally(async () =>await $.done());
|
||||||
|
|
||||||
async function getNotice() {
|
async function getNotice() {
|
||||||
let options = {
|
let options = {
|
||||||
@@ -195,19 +195,14 @@ function Env(t, s) {
|
|||||||
async sendMsg() {
|
async sendMsg() {
|
||||||
this.log("==============📣Center 通知📣==============")
|
this.log("==============📣Center 通知📣==============")
|
||||||
for (let item of this.notifyStr) {
|
for (let item of this.notifyStr) {
|
||||||
if (Object.prototype.toString.call(item) === '[object Object]') {
|
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') {
|
||||||
item = JSON.stringify(item)
|
|
||||||
}
|
|
||||||
if (Object.prototype.toString.call(arg) === '[object Array]') {
|
|
||||||
item = JSON.stringify(item)
|
item = JSON.stringify(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let message = this.notifyStr.join(this.logSeparator);
|
let message = this.notifyStr.join(this.logSeparator);
|
||||||
if (this.isNode()) {
|
if (this.isNode()) {
|
||||||
|
|
||||||
await notify.sendNotify(this.name, message);
|
await notify.sendNotify(this.name, message);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNode() {
|
isNode() {
|
||||||
@@ -309,8 +304,8 @@ function Env(t, s) {
|
|||||||
wait(t) {
|
wait(t) {
|
||||||
return new Promise((s) => setTimeout(s, t));
|
return new Promise((s) => setTimeout(s, t));
|
||||||
}
|
}
|
||||||
done(t = {}) {
|
async done(t = {}) {
|
||||||
this.sendMsg();
|
await this.sendMsg();
|
||||||
const s = new Date().getTime(),
|
const s = new Date().getTime(),
|
||||||
e = (s - this.startTime) / 1e3;
|
e = (s - this.startTime) / 1e3;
|
||||||
this.log(
|
this.log(
|
||||||
|
|||||||
13
蔚来.js
13
蔚来.js
@@ -65,7 +65,7 @@ class Task extends Public {
|
|||||||
|
|
||||||
})()
|
})()
|
||||||
.catch((e) => console.log(e))
|
.catch((e) => console.log(e))
|
||||||
.finally(() => $.done());
|
.finally(async () => await $.done());
|
||||||
|
|
||||||
async function getNotice() {
|
async function getNotice() {
|
||||||
let options = {
|
let options = {
|
||||||
@@ -103,19 +103,14 @@ function Env(t, s) {
|
|||||||
async sendMsg() {
|
async sendMsg() {
|
||||||
this.log("==============📣Center 通知📣==============")
|
this.log("==============📣Center 通知📣==============")
|
||||||
for (let item of this.notifyStr) {
|
for (let item of this.notifyStr) {
|
||||||
if (Object.prototype.toString.call(item) === '[object Object]') {
|
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') {
|
||||||
item = JSON.stringify(item)
|
|
||||||
}
|
|
||||||
if (Object.prototype.toString.call(arg) === '[object Array]') {
|
|
||||||
item = JSON.stringify(item)
|
item = JSON.stringify(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let message = this.notifyStr.join(this.logSeparator);
|
let message = this.notifyStr.join(this.logSeparator);
|
||||||
if (this.isNode()) {
|
if (this.isNode()) {
|
||||||
|
|
||||||
await notify.sendNotify(this.name, message);
|
await notify.sendNotify(this.name, message);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isNode() {
|
isNode() {
|
||||||
@@ -217,8 +212,8 @@ function Env(t, s) {
|
|||||||
wait(t) {
|
wait(t) {
|
||||||
return new Promise((s) => setTimeout(s, t));
|
return new Promise((s) => setTimeout(s, t));
|
||||||
}
|
}
|
||||||
done(t = {}) {
|
async done(t = {}) {
|
||||||
this.sendMsg();
|
await this.sendMsg();
|
||||||
const s = new Date().getTime(),
|
const s = new Date().getTime(),
|
||||||
e = (s - this.startTime) / 1e3;
|
e = (s - this.startTime) / 1e3;
|
||||||
this.log(
|
this.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user