mali-applet-ui 1.1.82 → 1.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/env/index.js +31 -28
- package/package.json +1 -1
- package/tongji/index.js +1 -1
package/env/index.js
CHANGED
|
@@ -441,38 +441,41 @@ function sendMail ({ receivedBy, subject, html }) {
|
|
|
441
441
|
|
|
442
442
|
function sendQyWechatMsg (webhook, opts) {
|
|
443
443
|
if (webhook) {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
444
|
+
// 管理员不需要通知
|
|
445
|
+
if (!['管理员', '超级管理员'].includes(process.env.BUILD_USER)) {
|
|
446
|
+
let params = {
|
|
447
|
+
msgtype: 'markdown',
|
|
448
|
+
markdown: {
|
|
449
|
+
content: opts.content || ''
|
|
450
|
+
}
|
|
448
451
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
452
|
+
switch (opts.msgType) {
|
|
453
|
+
case 'text':
|
|
454
|
+
params = {
|
|
455
|
+
msgtype: 'text',
|
|
456
|
+
image: {
|
|
457
|
+
content: opts.content || '',
|
|
458
|
+
mentioned_list: opts.mentionedList || [],
|
|
459
|
+
mentioned_mobile_list: opts.mentionedMobileList || []
|
|
460
|
+
}
|
|
458
461
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
462
|
+
break
|
|
463
|
+
case 'image':
|
|
464
|
+
params = {
|
|
465
|
+
msgtype: 'image',
|
|
466
|
+
image: {
|
|
467
|
+
base64: opts.base64 || '',
|
|
468
|
+
md5: opts.md5 || ''
|
|
469
|
+
}
|
|
467
470
|
}
|
|
468
|
-
|
|
469
|
-
|
|
471
|
+
break
|
|
472
|
+
}
|
|
473
|
+
return axios.post(webhook, params).then(res => {
|
|
474
|
+
return res.data
|
|
475
|
+
}).catch((e) => {
|
|
476
|
+
console.error(e)
|
|
477
|
+
})
|
|
470
478
|
}
|
|
471
|
-
return axios.post(webhook, params).then(res => {
|
|
472
|
-
return res.data
|
|
473
|
-
}).catch((e) => {
|
|
474
|
-
console.error(e)
|
|
475
|
-
})
|
|
476
479
|
} else {
|
|
477
480
|
console.error('企微机器人 webhook 地址不能为空')
|
|
478
481
|
}
|
package/package.json
CHANGED
package/tongji/index.js
CHANGED