|
|
@ -26,16 +26,15 @@ function dingding(message){ |
|
|
|
const url=`https://oapi.dingtalk.com/robot/send?access_token=${access_token}` |
|
|
|
const url=`https://oapi.dingtalk.com/robot/send?access_token=${access_token}` |
|
|
|
info(url) |
|
|
|
info(url) |
|
|
|
fetch(url,{ |
|
|
|
fetch(url,{ |
|
|
|
method:'POST', |
|
|
|
|
|
|
|
headers:{ |
|
|
|
headers:{ |
|
|
|
'Content-Type':'application/json' |
|
|
|
'Content-Type':'application/json' |
|
|
|
}, |
|
|
|
}, |
|
|
|
body:{ |
|
|
|
body:JSON.stringify({ |
|
|
|
msgtype:'text', |
|
|
|
msgtype:'text', |
|
|
|
text:{ |
|
|
|
text:{ |
|
|
|
content:message |
|
|
|
content:message |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}).then(res=>res.json()).then(res=>info(`钉钉推送结果:${JSON.stringify(res ,null, 2)}`)).catch(err=>error(err)) |
|
|
|
}).then(res=>res.json()).then(res=>info(`钉钉推送结果:${JSON.stringify(res ,null, 2)}`)).catch(err=>error(err)) |
|
|
|
} |
|
|
|
} |
|
|
|
//记录开始部署的时间
|
|
|
|
//记录开始部署的时间
|
|
|
|