mali-applet-ui 1.1.43 → 1.1.45
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.d.ts +1 -1
- package/env/index.js +30 -10
- package/package.json +1 -1
package/env/index.d.ts
CHANGED
package/env/index.js
CHANGED
|
@@ -267,25 +267,45 @@ function sendMail ({ receivedBy, subject, html }) {
|
|
|
267
267
|
})
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
function sendQyWechatMsg (webhook,
|
|
270
|
+
function sendQyWechatMsg (webhook, opts) {
|
|
271
271
|
if (!webhook) {
|
|
272
272
|
throw new Error('企微机器人 webhook 地址不能为空')
|
|
273
273
|
}
|
|
274
|
-
|
|
275
|
-
msgtype:
|
|
276
|
-
|
|
277
|
-
content:
|
|
278
|
-
mentioned_list: params.mentionedList || [],
|
|
279
|
-
mentioned_mobile_list: params.mentionedMobileList || []
|
|
274
|
+
let params = {
|
|
275
|
+
msgtype: 'markdown',
|
|
276
|
+
markdown: {
|
|
277
|
+
content: opts.content || ''
|
|
280
278
|
}
|
|
281
|
-
}
|
|
279
|
+
}
|
|
280
|
+
switch (opts.msgType) {
|
|
281
|
+
case 'text':
|
|
282
|
+
params = {
|
|
283
|
+
msgtype: 'text',
|
|
284
|
+
image: {
|
|
285
|
+
content: opts.content || '',
|
|
286
|
+
mentioned_list: opts.mentionedList || [],
|
|
287
|
+
mentioned_mobile_list: opts.mentionedMobileList || []
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
break
|
|
291
|
+
case 'image':
|
|
292
|
+
params = {
|
|
293
|
+
msgtype: 'image',
|
|
294
|
+
image: {
|
|
295
|
+
base64: opts.base64 || '',
|
|
296
|
+
md5: opts.md5 || ''
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
break
|
|
300
|
+
}
|
|
301
|
+
return axios.post(webhook, params).then(res => {
|
|
282
302
|
return res.data
|
|
283
303
|
})
|
|
284
304
|
}
|
|
285
305
|
|
|
286
|
-
function getBuildSuccessMsg () {
|
|
306
|
+
function getBuildSuccessMsg (description) {
|
|
287
307
|
return `
|
|
288
|
-
# <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE),
|
|
308
|
+
# <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, '-', getEnvName(process.env.VUE_APP_MODE), '已更新'].join('')}</font>
|
|
289
309
|
>> 构建时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
|
|
290
310
|
<font color="comment">-自动化发版</font>`
|
|
291
311
|
}
|