fix: 优化验证邮箱页面文案

This commit is contained in:
韦荣超 2022-03-09 09:52:00 +08:00
parent 8541e180cc
commit fe91765ab0
2 changed files with 5 additions and 3 deletions

View File

@ -598,7 +598,7 @@ class UsersController extends AbstractController
return Base::retError($validator->errors()->first()); return Base::retError($validator->errors()->first());
$res = UserEmailVerification::where('code', $data['code'])->first(); $res = UserEmailVerification::where('code', $data['code'])->first();
if (empty($res)) { if (empty($res)) {
return Base::retError('链接已失效'); return Base::retError('无效连接,请重新注册');
} }
// 如果已经校验过 // 如果已经校验过
if (intval($res->status) === 1) if (intval($res->status) === 1)
@ -610,7 +610,7 @@ class UsersController extends AbstractController
if (abs($time - $oldTime) > 86400) { if (abs($time - $oldTime) > 86400) {
$user = User::whereUserid($res->userid)->first(); $user = User::whereUserid($res->userid)->first();
UserEmailVerification::userEmailSend($user); UserEmailVerification::userEmailSend($user);
return Base::retError("链接已失效"); return Base::retError("链接已过期,已重新发送");
} }
UserEmailVerification::where('code', $data['code']) UserEmailVerification::where('code', $data['code'])
->update([ ->update([

View File

@ -8,7 +8,7 @@
<p>{{$L('今后您可以通过此邮箱重置您的账号密码')}}</p> <p>{{$L('今后您可以通过此邮箱重置您的账号密码')}}</p>
</div> </div>
<div class="validation-text" v-if="error"> <div class="validation-text" v-if="error">
<div>{{$L('链接已过期,已重新发送')}}</div> <div>{{errorText}}</div>
</div> </div>
<div slot="footer" v-if="success"> <div slot="footer" v-if="success">
<Button type="primary" @click="userLogout" long>{{$L('返回首页')}}</Button> <Button type="primary" @click="userLogout" long>{{$L('返回首页')}}</Button>
@ -26,6 +26,7 @@ export default {
return { return {
success: false, success: false,
error: false, error: false,
errorText: this.$L('链接已过期,已重新发送'),
} }
}, },
mounted() { mounted() {
@ -50,6 +51,7 @@ export default {
} else { } else {
this.success = false; this.success = false;
this.error = true; this.error = true;
this.errorText = this.$L(msg);
} }
}); });
}, },