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 CHANGED
@@ -18,4 +18,4 @@ export function sendQyWechatMsg(webhook: string, params: {
18
18
  mentionedList?: string[]
19
19
  mentionedMobileList?: string[]
20
20
  })
21
- export function getBuildSuccessMsg(): string
21
+ export function getBuildSuccessMsg(description: string): string
package/env/index.js CHANGED
@@ -267,25 +267,45 @@ function sendMail ({ receivedBy, subject, html }) {
267
267
  })
268
268
  }
269
269
 
270
- function sendQyWechatMsg (webhook, params) {
270
+ function sendQyWechatMsg (webhook, opts) {
271
271
  if (!webhook) {
272
272
  throw new Error('企微机器人 webhook 地址不能为空')
273
273
  }
274
- return axios.post(webhook, {
275
- msgtype: params.msgtype || 'markdown',
276
- [params.msgtype || 'markdown']: {
277
- content: params.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
- }).then(res => {
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), pack.description, '-', getEnvName(process.env.VUE_APP_MODE), '已更新'].join('')}</font>
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.43",
3
+ "version": "1.1.45",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",