Пример #1
0
 /**
  * [sendMsgAction 发送短信 发送验证码60秒内只能发送一次]
  * @return [type] [error 0 success 1]
  */
 public function sendMsgAction()
 {
     if (!$this->validFlag) {
         echo json_encode(array('ret' => 0, 'msg' => $this->warnMsg));
     } else {
         $Service = new Service($this->di);
         if (isset($this->_sanReq['mobile'])) {
             $mobile = $this->_sanReq['mobile'];
         } else {
             $mobile = $this->session->get('uinfo')['mobile'];
         }
         $res = $Service->makeMsg($this->_sanReq['type'], $mobile);
         if ($res) {
             echo json_encode(array('ret' => 1));
         } else {
             echo json_encode(array('ret' => 0, 'msg' => array('sendMsg' => array('msg' => $this->di['sysconfig']['flagMsg']['10018']))));
         }
     }
     exit;
 }