补全丢失css;删除登录前获取剪贴板和设备信息;将获取设备信息移动到登录时
This commit is contained in:
parent
001fbb149e
commit
a9fe9be78e
12
App.jsx
12
App.jsx
|
@ -56,7 +56,7 @@ import UpdateModal from "./components/UpdateModal";
|
|||
import StreamerNavigatorModal from "./components/StreamerNavigatorModal";
|
||||
import { Icon } from "@rneui/themed";
|
||||
import { StatusBar } from "expo-status-bar";
|
||||
import { save, get, remove, storeAppInfo } from "./utils/storeInfo";
|
||||
import { save, get, remove } from "./utils/storeInfo";
|
||||
import baseRequest from "./utils/baseRequest";
|
||||
import { generateSignature } from "./utils/crypto";
|
||||
import * as Clipboard from "expo-clipboard";
|
||||
|
@ -161,9 +161,6 @@ const App = () => {
|
|||
useEffect(() => {
|
||||
async function prepare() {
|
||||
try {
|
||||
//重新获取设备和app信息
|
||||
storeAppInfo();
|
||||
|
||||
const token = await get("token");
|
||||
const account = await get("account");
|
||||
const base = await baseRequest();
|
||||
|
@ -233,13 +230,6 @@ const App = () => {
|
|||
setInviterCode(null);
|
||||
}, []);
|
||||
|
||||
//当用户未登录时,获取剪贴板内容,用于绑定邀请人,同时保存设备信息
|
||||
useEffect(() => {
|
||||
if (state.isSignin) return;
|
||||
if (!checked) return; //用户未同意隐私政策时不获取剪贴板信息
|
||||
getClipboardContent();
|
||||
}, [checked]);
|
||||
|
||||
//登录后获取用户剪贴板内容
|
||||
useEffect(() => {
|
||||
if (!state.isSignin) return;
|
||||
|
|
|
@ -9,7 +9,7 @@ import { cryptoPassword, generateSignature } from "../../../utils/crypto";
|
|||
import { JSEncrypt } from "jsencrypt";
|
||||
import MyDivider from "../../../components/MyDivider";
|
||||
import baseRequest from "../../../utils/baseRequest";
|
||||
import { get, save } from "../../../utils/storeInfo";
|
||||
import { get, save, storeAppInfo } from "../../../utils/storeInfo";
|
||||
|
||||
export default function PasswordLogin() {
|
||||
const { signIn, checked, setChecked } = useContext(AuthContext);
|
||||
|
@ -72,6 +72,8 @@ export default function PasswordLogin() {
|
|||
});
|
||||
return;
|
||||
}
|
||||
//重新获取设备和app信息
|
||||
await storeAppInfo();
|
||||
//对手机号进行RSA加密
|
||||
const encrypt = new JSEncrypt();
|
||||
encrypt.setPublicKey(process.env.EXPO_PUBLIC_RSA_KEY);
|
||||
|
|
|
@ -8,7 +8,7 @@ import { AuthContext } from "../../../App";
|
|||
import { JSEncrypt } from "jsencrypt";
|
||||
import MyDivider from "../../../components/MyDivider";
|
||||
import baseRequest from "../../../utils/baseRequest";
|
||||
import { get, save } from "../../../utils/storeInfo";
|
||||
import { get, save, storeAppInfo } from "../../../utils/storeInfo";
|
||||
import { generateSignature } from "../../../utils/crypto";
|
||||
|
||||
export default function PhoneNumLogin() {
|
||||
|
@ -125,7 +125,8 @@ export default function PhoneNumLogin() {
|
|||
});
|
||||
return;
|
||||
}
|
||||
|
||||
//重新获取设备和app信息
|
||||
await storeAppInfo();
|
||||
//对手机号进行RSA加密
|
||||
const encrypt = new JSEncrypt();
|
||||
encrypt.setPublicKey(process.env.EXPO_PUBLIC_RSA_KEY);
|
||||
|
|
34
tailwind.css
34
tailwind.css
|
@ -42,10 +42,6 @@
|
|||
right: 0.5rem
|
||||
}
|
||||
|
||||
.right-3 {
|
||||
right: 0.75rem
|
||||
}
|
||||
|
||||
.right-5 {
|
||||
right: 1.25rem
|
||||
}
|
||||
|
@ -177,10 +173,22 @@
|
|||
margin-right: 1rem
|
||||
}
|
||||
|
||||
.mt-0 {
|
||||
margin-top: 0px
|
||||
}
|
||||
|
||||
.mt-0\.5 {
|
||||
margin-top: 0.125rem
|
||||
}
|
||||
|
||||
.mt-1 {
|
||||
margin-top: 0.25rem
|
||||
}
|
||||
|
||||
.mt-1\.5 {
|
||||
margin-top: 0.375rem
|
||||
}
|
||||
|
||||
.mt-14 {
|
||||
margin-top: 3.5rem
|
||||
}
|
||||
|
@ -273,6 +281,10 @@
|
|||
height: 8rem
|
||||
}
|
||||
|
||||
.h-48 {
|
||||
height: 12rem
|
||||
}
|
||||
|
||||
.h-5 {
|
||||
height: 1.25rem
|
||||
}
|
||||
|
@ -496,6 +508,11 @@
|
|||
border-top-right-radius: 1rem
|
||||
}
|
||||
|
||||
.rounded-t-3xl {
|
||||
border-top-left-radius: 1.5rem;
|
||||
border-top-right-radius: 1.5rem
|
||||
}
|
||||
|
||||
.border {
|
||||
border-width: 1px
|
||||
}
|
||||
|
@ -715,6 +732,11 @@
|
|||
padding-right: 0.5rem
|
||||
}
|
||||
|
||||
.px-2\.5 {
|
||||
padding-left: 0.625rem;
|
||||
padding-right: 0.625rem
|
||||
}
|
||||
|
||||
.px-3 {
|
||||
padding-left: 0.75rem;
|
||||
padding-right: 0.75rem
|
||||
|
@ -945,6 +967,10 @@
|
|||
color: rgb(255 255 255 / var(--tw-text-opacity))
|
||||
}
|
||||
|
||||
.underline {
|
||||
text-decoration-line: underline
|
||||
}
|
||||
|
||||
.opacity-70 {
|
||||
opacity: 0.7
|
||||
}
|
||||
|
|
|
@ -54,11 +54,6 @@
|
|||
"right": 8
|
||||
}
|
||||
},
|
||||
"right-3": {
|
||||
"style": {
|
||||
"right": 12
|
||||
}
|
||||
},
|
||||
"right-5": {
|
||||
"style": {
|
||||
"right": 20
|
||||
|
@ -227,11 +222,26 @@
|
|||
"marginRight": 16
|
||||
}
|
||||
},
|
||||
"mt-0": {
|
||||
"style": {
|
||||
"marginTop": 0
|
||||
}
|
||||
},
|
||||
"mt-0.5": {
|
||||
"style": {
|
||||
"marginTop": 2
|
||||
}
|
||||
},
|
||||
"mt-1": {
|
||||
"style": {
|
||||
"marginTop": 4
|
||||
}
|
||||
},
|
||||
"mt-1.5": {
|
||||
"style": {
|
||||
"marginTop": 6
|
||||
}
|
||||
},
|
||||
"mt-14": {
|
||||
"style": {
|
||||
"marginTop": 56
|
||||
|
@ -347,6 +357,11 @@
|
|||
"height": 128
|
||||
}
|
||||
},
|
||||
"h-48": {
|
||||
"style": {
|
||||
"height": 192
|
||||
}
|
||||
},
|
||||
"h-5": {
|
||||
"style": {
|
||||
"height": 20
|
||||
|
@ -650,6 +665,12 @@
|
|||
"borderTopRightRadius": 16
|
||||
}
|
||||
},
|
||||
"rounded-t-3xl": {
|
||||
"style": {
|
||||
"borderTopLeftRadius": 24,
|
||||
"borderTopRightRadius": 24
|
||||
}
|
||||
},
|
||||
"border": {
|
||||
"style": {
|
||||
"borderTopWidth": 1,
|
||||
|
@ -959,6 +980,12 @@
|
|||
"paddingRight": 8
|
||||
}
|
||||
},
|
||||
"px-2.5": {
|
||||
"style": {
|
||||
"paddingLeft": 10,
|
||||
"paddingRight": 10
|
||||
}
|
||||
},
|
||||
"px-3": {
|
||||
"style": {
|
||||
"paddingLeft": 12,
|
||||
|
@ -1240,6 +1267,11 @@
|
|||
"color": "rgb(255 255 255 / var(--tw-text-opacity))"
|
||||
}
|
||||
},
|
||||
"underline": {
|
||||
"style": {
|
||||
"textDecorationLine": "underline"
|
||||
}
|
||||
},
|
||||
"opacity-70": {
|
||||
"style": {
|
||||
"opacity": 0.7
|
||||
|
|
Loading…
Reference in New Issue