|
|
@@ -163,6 +163,7 @@ class ApplyController extends BaseController
|
|
|
$post['adminId'] = $this->adminId;
|
|
|
$authCode = $post['authCode'] ?? '';
|
|
|
$mobile = $post['mobile'] ?? '';
|
|
|
+ $fillMobile = $post['fillMobile'] ?? 1;
|
|
|
|
|
|
//避免重复提交
|
|
|
util::checkRepeatCommit($mobile, 10);
|
|
|
@@ -171,15 +172,23 @@ class ApplyController extends BaseController
|
|
|
$cacheKey = 'register_mobile_code_' . $ptStyle . '_' . $mobile;
|
|
|
$saveAuthCode = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
|
|
|
|
|
|
- if ($authCode != 19640123) {
|
|
|
- if (empty($saveAuthCode)) {
|
|
|
- util::fail('请填写验证码哦');
|
|
|
+ if($fillMobile == 1){
|
|
|
+ if ($authCode != 19640123) {
|
|
|
+ if (empty($saveAuthCode)) {
|
|
|
+ util::fail('请填写验证码哦');
|
|
|
+ }
|
|
|
+ if (empty($authCode)) {
|
|
|
+ util::fail('请填写验证码');
|
|
|
+ }
|
|
|
+ if ($saveAuthCode != $authCode) {
|
|
|
+ util::fail('验证码错误');
|
|
|
+ }
|
|
|
}
|
|
|
- if (empty($authCode)) {
|
|
|
- util::fail('请填写验证码');
|
|
|
- }
|
|
|
- if ($saveAuthCode != $authCode) {
|
|
|
- util::fail('验证码错误');
|
|
|
+ }else{
|
|
|
+ $cacheKey = 'getMobile_'.$mobile;
|
|
|
+ $hasGet = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
|
|
|
+ if(empty($hasGet)){
|
|
|
+ util::fail('请获取手机');
|
|
|
}
|
|
|
}
|
|
|
|