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 @@