CommonSMS.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: songyongming
  5. * Date: 15/1/20
  6. * Time: 22:32
  7. */
  8. class CommonSMS{
  9. public static function send($sms_type,$params = array()){
  10. switch ($sms_type) {
  11. case 'order_retrieve'://订单退款后发送短信
  12. Service::factory('SendSMSService')->tpl_send_sms(1594478,'#month#='.$params['month'].'&#day#='.$params['day'].'&#address#='.$params['address'],$params['mobile']);
  13. break;
  14. case 'final_order'://订单完成后发送短信
  15. Service::factory('SendSMSService')->tpl_send_sms(1594588,'#name#='.$params['name'].'&#num#='.$params['num'],$params['mobile']);
  16. // Service::factory('SendSMSService')->tpl_send_sms(862005,'#name#='.$params['name'],$params['mobile']);
  17. break;
  18. case 'order_pay_success'://订单支付成功后发送短信
  19. Service::factory('SendSMSService')->tpl_send_sms(1594484,'#month#='.$params['month'].'&#day#='.$params['day'].'&#address#='.$params['address'].'&#info#='.$params['info'].'&#master#='.$params['master'],$params['mobile']);
  20. break;
  21. default:
  22. return false;
  23. break;
  24. }
  25. }
  26. // 862005
  27. }