diff --git a/controller/misc.go b/controller/misc.go
index 755ccbd4..958a3716 100644
--- a/controller/misc.go
+++ b/controller/misc.go
@@ -127,8 +127,9 @@ func SendPasswordResetEmail(c *gin.Context) {
link := fmt.Sprintf("%s/user/reset?email=%s&token=%s", common.ServerAddress, email, code)
subject := fmt.Sprintf("%s密码重置", common.SystemName)
content := fmt.Sprintf("
您好,你正在进行%s密码重置。
"+
- "点击此处进行密码重置。
"+
- "重置链接 %d 分钟内有效,如果不是本人操作,请忽略。
", common.SystemName, link, common.VerificationValidMinutes)
+ "点击 此处 进行密码重置。
"+
+ "如果链接无法点击,请尝试点击下面的链接或将其复制到浏览器中打开:
%s
"+
+ "重置链接 %d 分钟内有效,如果不是本人操作,请忽略。
", common.SystemName, link, link, common.VerificationValidMinutes)
err := common.SendEmail(subject, email, content)
if err != nil {
c.JSON(http.StatusOK, gin.H{
diff --git a/web/src/components/LoginForm.js b/web/src/components/LoginForm.js
index bcc2df65..110dad46 100644
--- a/web/src/components/LoginForm.js
+++ b/web/src/components/LoginForm.js
@@ -1,36 +1,25 @@
import React, { useContext, useEffect, useState } from 'react';
-import {
- Button,
- Divider,
- Form,
- Grid,
- Header,
- Image,
- Message,
- Modal,
- Segment,
-} from 'semantic-ui-react';
+import { Button, Divider, Form, Grid, Header, Image, Message, Modal, Segment } from 'semantic-ui-react';
import { Link, useNavigate, useSearchParams } from 'react-router-dom';
import { UserContext } from '../context/User';
-import { API, getLogo, showError, showSuccess, showInfo } from '../helpers';
+import { API, getLogo, showError, showSuccess } from '../helpers';
const LoginForm = () => {
const [inputs, setInputs] = useState({
username: '',
password: '',
- wechat_verification_code: '',
+ wechat_verification_code: ''
});
const [searchParams, setSearchParams] = useSearchParams();
const [submitted, setSubmitted] = useState(false);
const { username, password } = inputs;
const [userState, userDispatch] = useContext(UserContext);
let navigate = useNavigate();
-
const [status, setStatus] = useState({});
const logo = getLogo();
useEffect(() => {
- if (searchParams.get("expired")) {
+ if (searchParams.get('expired')) {
showError('未登录或登录已过期,请重新登录!');
}
let status = localStorage.getItem('status');
@@ -78,7 +67,7 @@ const LoginForm = () => {
if (username && password) {
const res = await API.post(`/api/user/login`, {
username,
- password,
+ password
});
const { success, message, data } = res.data;
if (success) {
@@ -93,44 +82,44 @@ const LoginForm = () => {
}
return (
-
+
-
+
-
忘记密码?
-
+
点击重置
; 没有账户?
-
+
点击注册
@@ -140,8 +129,8 @@ const LoginForm = () => {
{status.github_oauth ? (
) : (
@@ -150,8 +139,8 @@ const LoginForm = () => {
{status.wechat_login ? (
) : (
@@ -175,18 +164,18 @@ const LoginForm = () => {
微信扫码关注公众号,输入「验证码」获取验证码(三分钟内有效)
-
@@ -92,5 +100,4 @@ const TopUp = () => {
);
};
-
-export default TopUp;
+export default TopUp;
\ No newline at end of file