EnableSms.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace addon\alisms\event;
  11. use addon\alisms\model\Config;
  12. /**
  13. * 查询启用的短信插件
  14. */
  15. class EnableSms
  16. {
  17. /**
  18. * 短信发送方式方式及配置
  19. */
  20. public function handle($param)
  21. {
  22. $info = array (
  23. "sms_type" => "alisms",
  24. "sms_type_name" => "阿里云短信",
  25. "edit_url" => "alisms://shop/sms/config",
  26. "shop_url" => "alisms://shop/sms/config",
  27. "desc" => "阿里云短信服务(Short Message Service)支持国内和国际快速发送验证码、短信通知和推广短信,服务范围覆盖全球200多个国家和地区。国内短信支持三网合一专属通道,与工信部携号转网平台实时互联。电信级运维保障,实时监控自动切换,到达率高达99%。"
  28. );
  29. $config_model = new Config();
  30. $config = $config_model->getSmsConfig($param[ 'site_id' ]);
  31. if ($config[ 'data' ][ 'is_use' ] == 1) {
  32. return $info;
  33. }
  34. }
  35. }