注册接口调试

webUi^2
zhaocheng 5 years ago
parent 8c6babbb9e
commit 4942208ad7
  1. 4
      frontend/controllers/ApiController.php

@ -906,7 +906,7 @@ class ApiController extends \yii\web\Controller
} }
if($code == '' || Yii::$app->cache->get('hy_vcode_'.$mobile) != $code){ if($code == '' || Yii::$app->cache->get('hy_vcode_'.$mobile) != $code){
$result['code'] = -1; $result['code'] = -1;
$result['msg'] = '验证码错误,系统保存为'.Yii::$app->cache->get('hy_vcode_'.$mobile); $result['msg'] = '验证码错误';
return $result; return $result;
} }
if($user) { if($user) {
@ -968,7 +968,7 @@ class ApiController extends \yii\web\Controller
$result['code'] = -1; $result['code'] = -1;
$result['msg'] = $e->getMessage(); $result['msg'] = $e->getMessage();
} }
Yii::$app->cache->remove('hy_vcode_'.$mobile); Yii::$app->cache->delete('hy_vcode_'.$mobile);
} }
return $result; return $result;
} }

Loading…
Cancel
Save