style: 修复关注按钮展示问题

This commit is contained in:
2025-11-30 21:27:36 +08:00
parent 98b4b820a0
commit cbf1013d92
4 changed files with 10 additions and 8 deletions

View File

@@ -70,7 +70,9 @@
.organizer-actions {
display: flex;
flex: 0 0 120px;
align-items: center;
justify-content: flex-end;
gap: 8px;
margin-left: auto;
flex-shrink: 0;

View File

@@ -142,7 +142,7 @@ export default function OrganizerInfo(props) {
>
{is_following ? (
<Text className={styles["organizer-actions-follow-text"]}>
</Text>
) : (
<>

View File

@@ -214,7 +214,7 @@ function Index() {
</View>
<View className={styles["detail-page-bg"]} style={backgroundImage} />
<View style={{ paddingTop: `${totalHeight }px` }}> </View>
<View style={{ paddingTop: `${totalHeight}px` }}> </View>
{/* swiper */}
<Carousel detail={detail} />
{/* content */}

View File

@@ -45,12 +45,12 @@ const navigateToLogin = (currentPath?: string) => {
// 检查登录状态,如果未登录则跳转到登录页
export const requireLogin = (): boolean => {
const isLoggedIn = check_login_status();
if (!isLoggedIn) {
navigateToLogin();
return false;
}
return true;
};
@@ -62,25 +62,25 @@ export const requireLoginWithPhone = (): boolean => {
navigateToLogin();
return false;
}
// 检查是否有手机号
// 优先从 store 中获取用户信息
const userInfo = useUser.getState().user;
let phone = (userInfo as any)?.phone;
// 如果 store 中没有,尝试从本地存储获取
if (!phone || phone.trim() === '') {
const localUserInfo = get_user_info();
phone = localUserInfo?.phone;
}
// 如果用户信息中没有手机号,或者手机号为空
if (!phone || phone.trim() === '') {
console.log('用户未绑定手机号,跳转到登录页绑定');
navigateToLogin();
return false;
}
return true;
};