删除登录前的读取剪贴板和保存设备信息
This commit is contained in:
parent
22a18da6ef
commit
c46df95627
13
App.jsx
13
App.jsx
|
@ -140,9 +140,6 @@ export default function App() {
|
|||
useEffect(() => {
|
||||
async function prepare() {
|
||||
try {
|
||||
//重新获取设备和app信息
|
||||
storeAppInfo();
|
||||
|
||||
const token = await get("token");
|
||||
const account = await get("account");
|
||||
const base = await baseRequest();
|
||||
|
@ -212,16 +209,10 @@ export default function App() {
|
|||
setInviterCode(null);
|
||||
}, []);
|
||||
|
||||
//当用户未登录时,获取剪贴板内容,用于绑定邀请人,同时保存设备信息
|
||||
useEffect(() => {
|
||||
if (state.isSignin) return;
|
||||
if (!checked) return; //用户未同意隐私政策时不获取剪贴板信息
|
||||
getClipboardContent();
|
||||
}, [checked]);
|
||||
|
||||
//登录后获取用户剪贴板内容
|
||||
//登录后获取用户剪贴板内容和设备和app信息
|
||||
useEffect(() => {
|
||||
if (!state.isSignin) return;
|
||||
storeAppInfo();
|
||||
getClipboardContent();
|
||||
}, [state.isSignin]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue