/** * 用户修改密码,进行手机号验证 * @return array|string */ public function actionPhonecha() { $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::phoneCha($phone); } else { $result = array('errorNum' => '1', 'errorMsg' => '参数错误', 'data' => null); } } } catch (ErrorException $e) { Yii::error("用户修改密码,进行手机号验证---异常 方法:actionPhonecha 参数:" . json_encode($result['data']), "app"); Yii::trace($e->getMessage(), "app"); $result = array('errorNum' => '7', 'errorMsg' => '服务器异常,请联系管理员', 'data' => null); } $result = App::AppReturn($result); return $result; }
public function actionSendcode_repass() { if (!$_POST['CellPhone']) { echo '请输入手机号。'; exit; } try { $phone = $_POST['CellPhone']; $result = \frontend\actions\app\member::phoneCha($phone); if ($result['errorNum'] == 0) { echo '验证码已发送,请注意查收。'; exit; } elseif ($result['errorNum'] == 1) { echo $result['errorMsg']; exit; } } catch (ErrorException $ex) { echo $ex->getMessage(); exit; } }