This commit is contained in:
smallfawn
2025-03-09 21:38:09 +08:00
parent c542fd91b2
commit 9360acb49e
8 changed files with 46 additions and 32 deletions

2
dw.js

File diff suppressed because one or more lines are too long

View File

@@ -205,11 +205,13 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
} }
} }
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);

View File

@@ -248,11 +248,13 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
} }
} }
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);

View File

@@ -189,11 +189,13 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]' || Object.prototype.toString.call(item) === '[object Array]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
} }
} }
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);

View File

@@ -164,11 +164,13 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]' || Object.prototype.toString.call(item) === '[object Array]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
} }
} }
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);

View File

@@ -167,11 +167,13 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
} }
} }
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);

View File

@@ -194,11 +194,13 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]'||Object.prototype.toString.call(item) === '[object Array]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
} }
} }
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);

View File

@@ -102,11 +102,13 @@ function Env(t, s) {
} }
async sendMsg() { async sendMsg() {
this.log("==============📣Center 通知📣==============") this.log("==============📣Center 通知📣==============")
for (let item of this.notifyStr) { for (let i = 0; i < this.notifyStr.length; i++) {
if (Object.prototype.toString.call(item) === '[object Object]' || Object.prototype.toString.call(item) === '[object Array]') { if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' ||
item = JSON.stringify(item) Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') {
this.notifyStr[i] = JSON.stringify(this.notifyStr[i]);
} }
} }
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);