瀏覽代碼

fix: oauth aff

CalciumIon 1 年之前
父節點
當前提交
334a2424e9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      web/src/components/utils.js

+ 2 - 2
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);