north il y a 7 ans
Parent
commit
bd72e31464

+ 3 - 0
www/protected/components/CommonSMS.php

@@ -25,6 +25,9 @@ class CommonSMS{
             case 'yuezihuisuo_code'://订单支付成功后发送短信
                 Service::factory('SendSMSService')->tpl_send_sms(1876802,'#code#='.$params['code'],$params['mobile']);
                 break;
+            case 'yiguanjia_code'://订单支付成功后发送短信
+                Service::factory('SendSMSService')->tpl_send_sms(1997758,'#code#='.$params['code'],$params['mobile']);
+                break;
             default:
                 return false;
                 break;

+ 9 - 1
www/protected/modules/moonclub/controllers/ReserveController.php

@@ -257,8 +257,16 @@ class ReserveController extends MoonClubBaseController
     public function actionCode() {
 
         $mobile = Yii::app()->getRequest()->getParam("mobile");
+        $type = intval(Yii::app()->getRequest()->getParam("type",0));
         $data['code'] = rand(1000,9999);
-        CommonSMS::send('yuezihuisuo_code', array('code' => $data['code'],'mobile' => $mobile));
+        $sms_type ='';
+        if ($type == 0 ) {
+            $sms_type = 'yuezihuisuo_code';
+        } else {
+            $sms_type = 'yiguanjia_code';
+        }
+
+        CommonSMS::send($sms_type, array('code' => $data['code'],'mobile' => $mobile));
         CommonFn::requestAjax(true,CommonFn::getMessage('message','success'),$data);
     }