Commit 309cbc76 authored by 汪波's avatar 汪波

Merge remote-tracking branch 'origin/dev' into dev

parents 6bd70f43 1e8209de
...@@ -144,7 +144,7 @@ class UserCenterController extends Controller ...@@ -144,7 +144,7 @@ class UserCenterController extends Controller
$msg = ""; $msg = "";
if (Utils::getStringLen($username) > 20) { if (Utils::getStringLen($username) > 20) {
$status = FALSE; $status = FALSE;
$msg = '昵称超过长度限制'; $msg = '昵称请保持在10个汉字以内';
} else { } else {
$user = Yii::$app->user->identity; $user = Yii::$app->user->identity;
$oldAvatar = FALSE;//标记是否进行资源清理 $oldAvatar = FALSE;//标记是否进行资源清理
......
...@@ -21,6 +21,7 @@ class SignupForm extends Model ...@@ -21,6 +21,7 @@ class SignupForm extends Model
public $rePassword; public $rePassword;
public $from; public $from;
public $verifyCode; public $verifyCode;
public $token;
/** /**
* @inheritdoc * @inheritdoc
...@@ -29,7 +30,7 @@ class SignupForm extends Model ...@@ -29,7 +30,7 @@ class SignupForm extends Model
{ {
return [ return [
['telephone', 'trim'], ['telephone', 'trim'],
[['telephone', 'from'], 'required'], [['telephone', 'from','token'], 'required'],
['telephone', 'unique', 'targetClass' => '\common\models\User', 'message' => '该电话号码已经被注册'], ['telephone', 'unique', 'targetClass' => '\common\models\User', 'message' => '该电话号码已经被注册'],
['telephone', 'validateTelephone'], ['telephone', 'validateTelephone'],
[['password', 'rePassword'], 'required'], [['password', 'rePassword'], 'required'],
...@@ -38,7 +39,7 @@ class SignupForm extends Model ...@@ -38,7 +39,7 @@ class SignupForm extends Model
['rePassword', 'compare', 'compareAttribute' => 'password'], ['rePassword', 'compare', 'compareAttribute' => 'password'],
['from', 'integer'], ['from', 'integer'],
['verifyCode', 'required'], ['verifyCode', 'required'],
['verifyCode', 'captcha'] ['verifyCode', 'captcha','message'=>'验证码不正确']
]; ];
} }
......
...@@ -34,7 +34,7 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js'); ...@@ -34,7 +34,7 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js');
</div> </div>
<div class="v-code input-wrapper"> <div class="v-code input-wrapper">
<input id="token" name="token" type="text" class="" placeholder="验证码"> <input id="token" name="token" type="text" value="<?= $model->token ?>" class="" placeholder="验证码">
<span id="token_tips" class="tips tip-vcode"><?= $model->getFirstError('token') ?></span> <span id="token_tips" class="tips tip-vcode"><?= $model->getFirstError('token') ?></span>
<button class="btn btn-get-vcode" id="send_msg">获取验证码</button> <button class="btn btn-get-vcode" id="send_msg">获取验证码</button>
</div> </div>
...@@ -47,7 +47,6 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js'); ...@@ -47,7 +47,6 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js');
<div class="check-password input-wrapper"> <div class="check-password input-wrapper">
<input id="repassword" name="rePassword" type="password" class="" placeholder="再次输入密码" required=""> <input id="repassword" name="rePassword" type="password" class="" placeholder="再次输入密码" required="">
<span class="tips tip-vcode"><?= $model->getFirstError('rePassword') ?></span>
<span id="repassword_tips" class="tips"><?= $model->getFirstError('rePassword') ?></span> <span id="repassword_tips" class="tips"><?= $model->getFirstError('rePassword') ?></span>
</div> </div>
<div class="verify-code-box input-wrapper last-wrapper"> <div class="verify-code-box input-wrapper last-wrapper">
......
...@@ -37,7 +37,7 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js'); ...@@ -37,7 +37,7 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js');
<div class="reg-box"> <div class="reg-box">
<div class="phone input-wrapper"> <div class="phone input-wrapper">
<input name="token" type="text" class="" value="<?= $model->token?>" placeholder="请输入6位验证码" required="" autofocus=""> <input name="token" type="text" class="" value="<?= $model->token?>" placeholder="请输入6位短信验证码" required="" autofocus="">
<span class="tips"><?= $model->getFirstError('token') ?></span> <span class="tips"><?= $model->getFirstError('token') ?></span>
</div> </div>
<div class="verify-code-box input-wrapper last-wrapper""> <div class="verify-code-box input-wrapper last-wrapper"">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment