1
0
mirror of https://github.com/shinnytech/diff synced 2020-06-03 18:26:18 +00:00
diff/funcset/notify.rst
2018-06-08 15:25:54 +08:00

41 lines
1.5 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.. _notify:
通知
==================================================
通知通过 `rtn_data` 包中的 notify 字段发送, 如下所示
.. code-block:: javascript
{
"aid": "rtn_data", //数据推送
"data": [ //diff数据数组, 一次推送中可能含有多个数据包
{
"notify": { //通知信息
"2010": {
"type": "MESSAGE", //消息类型
"level": "INFO", //消息等级
"code": 1000, //消息代码
"content": "abcd", //消息正文
}
},
}
]
}
================= ================================================
type 说明
================= ================================================
MESSAGE content是一个短字符串通常只有1行
TEXT content是一个长文本通常有多行内容
HTML content为HTML格式
================= ================================================
================= ================================================
level 信息等级
================= ================================================
INFO 普通消息
WARNING 警告
ERROR 错误
================= ================================================