发送消息
<h5>简要描述</h5>
<ul>
<li>钉钉群机器人 发送消息</li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">url</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">机器人地址</td>
</tr>
<tr>
<td style="text-align: left;">secret</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">机器人密钥,关键字模式不用填</td>
</tr>
<tr>
<td style="text-align: left;">content</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">消息内容</td>
</tr>
<tr>
<td style="text-align: left;">atMobiles</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">string[]</td>
<td style="text-align: left;">at手机号,可多个</td>
</tr>
<tr>
<td style="text-align: left;">atAll</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">是否at所有人</td>
</tr>
</tbody>
</table>
<h5>代码示例</h5>
<pre><code class="language-javascript">// 演示的地址和密钥,具体获取参考这个网页: https://www.dingtalk.com/qidian/help-detail-20781541.html
// https://blog.csdn.net/weixin_44646065/article/details/110637713
// 例子1:密钥方式
pd.notice.dingTalkSend(&quot;https://oapi.dingtalk.com/robot/send?access_token=f7ddd39add...9f84ddce72de&quot;, &quot;SECb52...832cf&quot;, &quot;密钥消息&quot;,null, true);
// 例子2:关键字方式
pd.notice.dingTalkSend(&quot;https://oapi.dingtalk.com/robot/send?access_token=f7ddd39add...9f84ddce72de&quot;, null, &quot;关键字消息&quot;,null, true);
// 例子3:密钥,at手机号
pd.notice.dingTalkSend(&quot;https://oapi.dingtalk.com/robot/send?access_token=f7ddd39add...9f84ddce72de&quot;, &quot;SECb52...832cf&quot;, &quot;at手机号&quot;,[&quot;138..8932&quot;,&quot;139..4592&quot;], false);</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">返回值</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">string/null</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">json字符串</td>
</tr>
</tbody>
</table>
<pre><code class="language-javascript">{
&quot;errcode&quot;: 0,
&quot;errmsg&quot;: &quot;ok&quot;
}</code></pre>