From 334a2424e956e0c72908f7d6fdeb723b772c287d Mon Sep 17 00:00:00 2001 From: CalciumIon <1808837298@qq.com> Date: Mon, 18 Nov 2024 18:53:55 +0800 Subject: [PATCH] fix: oauth aff --- web/src/components/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/utils.js b/web/src/components/utils.js index a2ee8b7e..a22f76ed 100644 --- a/web/src/components/utils.js +++ b/web/src/components/utils.js @@ -2,8 +2,8 @@ import { API, showError } from '../helpers'; export async function getOAuthState() { let path = '/api/oauth/state'; - let affCode = new URLSearchParams(window.location.search).get('aff'); - if (affCode) { + let affCode = localStorage.getItem('aff'); + if (affCode && affCode.length > 0) { path += `?aff=${affCode}`; } const res = await API.get(path);