WechatDict.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\dict\channel;
  12. class WechatDict
  13. {
  14. /************************************************* 请求消息的属性 *****************************************/
  15. //请求消息的属性 事件
  16. const MESSAGE_TYPE_EVENT = 'event';
  17. //请求消息的属性 文本
  18. const MESSAGE_TYPE_TEXT = 'text';
  19. //请求消息的属性 图片
  20. const MESSAGE_TYPE_IMAGE = 'image';
  21. //请求消息的属性 语音
  22. const MESSAGE_TYPE_VOICE = 'voice';
  23. //请求消息的属性 视频
  24. const MESSAGE_TYPE_VIDEO = 'video';
  25. //请求消息的属性 坐标
  26. const MESSAGE_TYPE_LOCATION = 'location';
  27. //请求消息的属性 链接
  28. const MESSAGE_TYPE_LINK = 'link';
  29. //请求消息的属性 文件
  30. const MESSAGE_TYPE_FILE = 'file';
  31. /************************************************* 请求事件的类型 *****************************************/
  32. //事件类型 - 关注
  33. const EVENT_SUBSCRIBE = 'subscribe';
  34. const EVENT_SCAN = 'SCAN';
  35. /************************************************* 回复的类型 *****************************************/
  36. const REPLY_SUBSCRIBE = 'subscribe';
  37. const REPLY_DEFAULT = 'default';
  38. const REPLY_KEYWORD = 'keyword';
  39. /************************************************* 消息加解密方式 not_encrypt 明文 compatible 兼容 safe 安全 *****************************************/
  40. const NOT_ENCRYPT = 'not_encrypt';//明文
  41. const COMPATIBLE = 'compatible';//兼容
  42. const SAFE = 'safe';//safe
  43. /**
  44. * 加解密方式
  45. * @return array
  46. */
  47. public static function getEncryptionType()
  48. {
  49. return [
  50. self::NOT_ENCRYPT => get_lang('dict_wechat_config.not_encrypt'),//明文
  51. self::COMPATIBLE => get_lang('dict_wechat_config.compatible'),//兼容
  52. self::SAFE => get_lang('dict_wechat_config.safe'),//安全
  53. ];
  54. }
  55. }