EnableSms.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * NiuShop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. */
  9. namespace addon\niusms\event;
  10. use addon\niusms\model\Config;
  11. /**
  12. * 查询启用的短信插件
  13. */
  14. class EnableSms
  15. {
  16. /**
  17. * 短信发送方式方式及配置
  18. */
  19. public function handle($param)
  20. {
  21. $info = array (
  22. "sms_type" => "niusms",
  23. "sms_type_name" => "牛云短信",
  24. "shop_url" => "niusms://shop/sms/index",
  25. "desc" => "专业化系统化短信,与商城系统紧密相连,不需要专门配置短信模板即可使用。"
  26. );
  27. $config_model = new Config();
  28. $config = $config_model->getSmsConfig($param[ 'site_id' ]);
  29. if ($config[ 'data' ][ 'is_use' ] == 1) {
  30. return $info;
  31. }
  32. }
  33. }