diff --git a/app/Http/Controllers/Api/SystemController.php b/app/Http/Controllers/Api/SystemController.php index 5550e393b..1b38b15e8 100755 --- a/app/Http/Controllers/Api/SystemController.php +++ b/app/Http/Controllers/Api/SystemController.php @@ -753,24 +753,4 @@ class SystemController extends AbstractController } return $array; } - - /** - * @api {get} api/system/get/regverify 18. 获取是否开启邮箱验证 - * - * @apiDescription 获取邮箱配置是否开启注册邮箱验证 - * @apiVersion 1.0.0 - * @apiGroup system - * @apiName get__regverify - * - * @apiSuccess {Number} ret 返回状态码(1正确、0错误) - * @apiSuccess {String} msg 返回信息(错误描述) - * @apiSuccess {Object} data 返回数据 - */ - public function get__regverify() - { - User::auth(); - $isRegVerify = Base::settingFind('emailSetting', 'reg_verify') === 'open'; - return Base::retSuccess('success', $isRegVerify ? 1 : 0); - } - } diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index b97a6d326..6cae12ade 100755 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -986,12 +986,12 @@ class UsersController extends AbstractController } /** - * @api {get} api/users/send/email 18. 发送邮箱验证码 + * @api {get} api/users/email/send 18. 发送邮箱验证码 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 * @apiGroup users - * @apiName send__email + * @apiName email__send * * @apiParam {Number} type 邮件类型 * @apiParam {String} email 邮箱地址 @@ -1000,11 +1000,12 @@ class UsersController extends AbstractController * @apiSuccess {String} msg 返回信息(错误描述) * @apiSuccess {Object} data 返回数据 */ - public function send__email() + public function email__send() { + $user = User::auth(); + // $type = Request::input('type', 2); $email = Request::input('email'); - $user = User::auth(); if (!$email) { return Base::retError('请输入新邮箱地址'); } @@ -1025,7 +1026,7 @@ class UsersController extends AbstractController } /** - * @api {get} api/users/edit/email 19. 修改邮箱 + * @api {get} api/users/email/edit 19. 修改邮箱 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1039,9 +1040,10 @@ class UsersController extends AbstractController * @apiSuccess {String} msg 返回信息(错误描述) * @apiSuccess {Object} data 返回数据 */ - public function edit__email() + public function email__edit() { $user = User::auth(); + // $user->checkSystem(); // $newEmail = trim(Request::input('newEmail')); @@ -1126,8 +1128,6 @@ class UsersController extends AbstractController return Base::retError('删除失败'); } } - return Base::retSuccess('success', $user); } - } diff --git a/app/Models/UserEmailVerification.php b/app/Models/UserEmailVerification.php index 9d7c24794..1dff69259 100644 --- a/app/Models/UserEmailVerification.php +++ b/app/Models/UserEmailVerification.php @@ -16,6 +16,7 @@ use Guanguans\Notify\Messages\EmailMessage; * @property string|null $code 验证参数 * @property string|null $email 电子邮箱 * @property int|null $status 0-未验证,1-已验证 + * @property int|null $type 邮件类型:1-邮箱认证,2-修改邮箱 * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification newModelQuery() @@ -26,11 +27,10 @@ use Guanguans\Notify\Messages\EmailMessage; * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereEmail($value) * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereUserid($value) * @mixin \Eloquent - * @property int|null $type 邮件类型:1-邮箱认证,2-修改邮箱,3-删除账号 - * @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereType($value) */ class UserEmailVerification extends AbstractModel { diff --git a/resources/assets/js/pages/manage/setting/components/SystemEmailSetting.vue b/resources/assets/js/pages/manage/setting/components/SystemEmailSetting.vue index f8bb6fddd..978831e41 100644 --- a/resources/assets/js/pages/manage/setting/components/SystemEmailSetting.vue +++ b/resources/assets/js/pages/manage/setting/components/SystemEmailSetting.vue @@ -29,7 +29,11 @@ {{ $L('开启') }} {{ $L('关闭') }} -
{{$L('开启后帐号需验证通过才可登录')}}
+
+ {{$L('开启后:')}}
+ {{$L('① 帐号需验证通过才可登录')}}
+ {{$L('② 修改邮箱和删除账号需要邮箱验证码')}} +
diff --git a/resources/assets/js/pages/manage/setting/delete.vue b/resources/assets/js/pages/manage/setting/delete.vue index e45747de7..cbd551563 100644 --- a/resources/assets/js/pages/manage/setting/delete.vue +++ b/resources/assets/js/pages/manage/setting/delete.vue @@ -3,8 +3,10 @@
- - + +
@@ -14,7 +16,8 @@ - +
-
-

{{ $L('删除DooTask账号') }}

-
{{ $L('账号删除后,该账号将无法正常登录且无法恢复,账号下的所有数据也将被删除。') }}
-
-
{{ $L('注销前,请确认一下事项:') }}
-
{{ $L('1、您将无法查看该账号内的任何信息,包括账号信息、文件记录、聊天记录、项目信息、团队成员信息等。') }}
-
{{ $L('2、若你是团队的所有者,请在注销您的账户前转移所有权。例如该账户所创建的项目(可将项目移交他人或删除项目)以及文件夹。') }}
-
{{ $L('3、您将退出所有群聊,无法查到过往消息和人员。') }}
-
{{ $L('4、请保证账号未被暂停使用。') }}
-
+ :title="$L(`删除${appTitle}账号`)" + class="page-setting-delete-box"> +
{{ $L('账号删除后,该账号将无法正常登录且无法恢复,账号下的所有数据也将被删除。') }}
+
+
{{ $L('注销前,请确认一下事项:') }}
+
{{ $L('1、您将无法查看该账号内的任何信息,包括账号信息、文件记录、聊天记录、项目信息、团队成员信息等。') }}
+
{{ $L('2、若你是团队的所有者,请在注销您的账户前转移所有权。例如该账户所创建的项目(可将项目移交他人或删除项目)以及文件夹。') }}
+
{{ $L('3、您将退出所有群聊,无法查到过往消息和人员。') }}
+
{{ $L('4、请保证账号未被暂停使用。') }}