feat: 登录按钮显示

This commit is contained in:
eric
2022-11-27 12:02:35 +08:00
parent fa31230d84
commit 00dbe2a236
2 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -40,6 +40,8 @@ const my = (props: any) => {
const [detailsData, setdetailsData] = useState<any>([]); //活动详情
const [currentIndex, setcurrentIndex] = useState(0);
const [isin, setisin] = useState(false); //0初始 1未登录 2有手机号
const [initOK, setinitOK] = useState(false); //是否加载完成
useEffect(() => {
getLogin();
@@ -49,6 +51,7 @@ const my = (props: any) => {
let isLogin: any = await phoneLogin();
console.log('isLogin',isLogin)
setisin(isLogin);
setinitOK(true)
};
useEffect(() => {
@@ -184,7 +187,7 @@ const my = (props: any) => {
src="cloud://citynew-0givkbre03955d8c.6369-citynew-0givkbre03955d8c-1253655588/images/touxiang/images.jpg"
/>
{!isin && (
{!isin && initOK && (
<View className="loginBtn">
<Button
type="primary"