Compare commits

...

6 Commits

Author SHA1 Message Date
Karson 4ca7d2b15f
!507 补充多语言
Merge pull request !507 from 御宅男(YznCMS官方)/Branch_f804c8a6
2025-08-06 02:57:05 +00:00
Karson 1a3739f41c
!506 统一风格都用$user->id
Merge pull request !506 from 御宅男(YznCMS官方)/Branch_f804c8a5
2025-08-06 02:56:24 +00:00
Karson e2795a8d13
!505 表格删除
Merge pull request !505 from 御宅男(YznCMS官方)/Branch_f804c8a4
2025-08-06 02:55:49 +00:00
ken678 cfd7068a99 补充多语言 2025-08-06 10:24:22 +08:00
ken678 e06f0e2738 统一风格都用$user->id 2025-08-06 10:19:08 +08:00
ken678 78c5c2a658 表格删除 2025-08-05 17:03:23 +08:00
4 changed files with 6 additions and 5 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', '<>', $this->auth->id)->find();
$exists = \app\common\model\User::where('username', $username)->where('id', '<>', $user->id)->find();
if ($exists) {
$this->error(__('Username already exists'));
}
$user->username = $username;
}
if ($nickname) {
$exists = \app\common\model\User::where('nickname', $nickname)->where('id', '<>', $this->auth->id)->find();
$exists = \app\common\model\User::where('nickname', $nickname)->where('id', '<>', $user->id)->find();
if ($exists) {
$this->error(__('Nickname already exists'));
}

View File

@ -8,6 +8,7 @@ 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">获取验证码</a>
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="changeemail">{:__('Get code')}</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">获取验证码</a>
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/sms/send')}" data-type="mobile" data-event="changemobile">{:__('Get code')}</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 ($(window).width() < 480) {
if (left < 0 || $(window).width() < 480) {
top = left = undefined;
}
Layer.confirm(