Loading ...

钉钉推送

Author: jason47, Date: 2019-07-29 19:38:03
Tags:

  • $.ddNotice(title, content)

title: 字符串类型,推送的标题 content: 数组类型,markdown格式


$.ddNotice = function(title, content) {
    content = content == null ? title : content instanceof Array ? content.join('\n') : content
    HttpQuery(DING_URI, {
        method: 'POST',
        timeout: 3000,
        data: JSON.stringify({
            msgtype: 'markdown',
            markdown: {
                title: title,
                text: content
            }
        })
    }, null, 'Content-Type: application/json')
}

More