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