SmsEnum.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\common\enum\notice;
  15. /**
  16. * 短信枚举
  17. * Class SmsEnum
  18. * @package app\common\enum
  19. */
  20. class SmsEnum
  21. {
  22. /**
  23. * 发送状态
  24. */
  25. const SEND_ING = 0;
  26. const SEND_SUCCESS = 1;
  27. const SEND_FAIL = 2;
  28. /**
  29. * 短信平台
  30. */
  31. const ALI = 1;
  32. const TENCENT = 2;
  33. /**
  34. * @notes 获取短信平台名称
  35. * @param $value
  36. * @return string
  37. * @author 段誉
  38. * @date 2022/8/5 11:10
  39. */
  40. public static function getNameDesc($value)
  41. {
  42. $desc = [
  43. 'ALI' => '阿里云短信',
  44. 'TENCENT' => '腾讯云短信',
  45. ];
  46. return $desc[$value] ?? '';
  47. }
  48. }