fix: oauth aff

This commit is contained in:
CalciumIon
2024-11-18 18:52:14 +08:00
parent 475450cd07
commit 76a81ad5c9
5 changed files with 188 additions and 13 deletions

View File

@@ -44,8 +44,15 @@ const LoginForm = () => {
const [turnstileToken, setTurnstileToken] = useState('');
let navigate = useNavigate();
const [status, setStatus] = useState({});
const [showWeChatLoginModal, setShowWeChatLoginModal] = useState(false);
const logo = getLogo();
let affCode = new URLSearchParams(window.location.search).get('aff');
if (affCode) {
localStorage.setItem('aff', affCode);
}
useEffect(() => {
if (searchParams.get('expired')) {
showError('未登录或登录已过期,请重新登录!');
@@ -61,7 +68,6 @@ const LoginForm = () => {
}
}, []);
const [showWeChatLoginModal, setShowWeChatLoginModal] = useState(false);
const onWeChatLoginClicked = () => {
setShowWeChatLoginModal(true);