Compare commits

..

No commits in common. "4ca7d2b15f89a784a5ffa80b06105ba69c93093e" and "0126139be3f64047e2f112d29fc0df532a303eb7" have entirely different histories.

4 changed files with 5 additions and 6 deletions

View File

@ -179,14 +179,14 @@ class User extends Api
$bio = $this->request->post('bio');
$avatar = $this->request->post('avatar', '', 'trim,strip_tags,htmlspecialchars');
if ($username) {
$exists = \app\common\model\User::where('username', $username)->where('id', '<>', $user->id)->find();
$exists = \app\common\model\User::where('username', $username)->where('id', '<>', $this->auth->id)->find();
if ($exists) {
$this->error(__('Username already exists'));
}
$user->username = $username;
}
if ($nickname) {
$exists = \app\common\model\User::where('nickname', $nickname)->where('id', '<>', $user->id)->find();
$exists = \app\common\model\User::where('nickname', $nickname)->where('id', '<>', $this->auth->id)->find();
if ($exists) {
$this->error(__('Nickname already exists'));
}

View File

@ -8,7 +8,6 @@ return [
'Mobile' => '手机号',
'Email' => '邮箱',
'Captcha' => '验证码',
'Get code' => '获取验证码',
'Lv' => 'Lv',
'Score' => '积分',
'Day' => '天',

View File

@ -123,7 +123,7 @@
<div class="input-group">
<input type="text" name="captcha" id="email-captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_ems_correct')}, event=changeemail, email:#email)" />
<span class="input-group-btn" style="padding:0;border:none;">
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="changeemail">{:__('Get code')}</a>
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="changeemail">获取验证码</a>
</span>
</div>
<span class="msg-box"></span>
@ -156,7 +156,7 @@
<div class="input-group">
<input type="text" name="captcha" id="mobile-captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_sms_correct')}, event=changemobile, mobile:#mobile)" />
<span class="input-group-btn" style="padding:0;border:none;">
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/sms/send')}" data-type="mobile" data-event="changemobile">{:__('Get code')}</a>
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/sms/send')}" data-type="mobile" data-event="changemobile">获取验证码</a>
</span>
</div>
<span class="msg-box"></span>

View File

@ -725,7 +725,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
if (top + 154 > $(window).height()) {
top = top - 154;
}
if (left < 0 || $(window).width() < 480) {
if ($(window).width() < 480) {
top = left = undefined;
}
Layer.confirm(