Esempio n. 1
0
 /**
  * 用户手机注册获取验证码
  * @return array|bool|string
  */
 public function actionPhoneregister()
 {
     $result = App::AppGet();
     try {
         if ($result['errorNum']) {
             $result = array('errorNum' => $result['errorNum'], 'errorMsg' => $result['errorMsg'], 'data' => null);
         } else {
             $data = $result['data'];
             if (array_key_exists('phone', $data)) {
                 $phone = $data['phone'];
                 $result = member::phonpreg_matchster($phone);
             } else {
                 $result = array('errorNum' => '1', 'errorMsg' => '参数错误', 'data' => null);
             }
         }
     } catch (ErrorException $e) {
         Yii::error("用户手机注册获取验证码---异常 方法:actionPhoneregister 参数:" . json_encode($result['data']), "app");
         Yii::trace($e->getMessage(), "app");
         $result = array('errorNum' => '7', 'errorMsg' => '服务器异常,请联系管理员', 'data' => null);
     }
     $result = App::AppReturn($result);
     return $result;
 }
Esempio n. 2
0
 /**
  * 发送手机验证码
  * @return string
  */
 public function actionSendcode()
 {
     $phone = $_POST['Phone'];
     $send = member::phonpreg_matchster($phone);
     return json_encode($send);
 }