Merge branch 'feat/liujie'
This commit is contained in:
@@ -70,7 +70,9 @@
|
|||||||
|
|
||||||
.organizer-actions {
|
.organizer-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 0 0 120px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export default function OrganizerInfo(props) {
|
|||||||
>
|
>
|
||||||
{is_following ? (
|
{is_following ? (
|
||||||
<Text className={styles["organizer-actions-follow-text"]}>
|
<Text className={styles["organizer-actions-follow-text"]}>
|
||||||
取消关注
|
已关注
|
||||||
</Text>
|
</Text>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ function Index() {
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles["detail-page-bg"]} style={backgroundImage} />
|
<View className={styles["detail-page-bg"]} style={backgroundImage} />
|
||||||
|
|
||||||
<View style={{ paddingTop: `${totalHeight }px` }}> </View>
|
<View style={{ paddingTop: `${totalHeight}px` }}> </View>
|
||||||
{/* swiper */}
|
{/* swiper */}
|
||||||
<Carousel detail={detail} />
|
<Carousel detail={detail} />
|
||||||
{/* content */}
|
{/* content */}
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ const navigateToLogin = (currentPath?: string) => {
|
|||||||
// 检查登录状态,如果未登录则跳转到登录页
|
// 检查登录状态,如果未登录则跳转到登录页
|
||||||
export const requireLogin = (): boolean => {
|
export const requireLogin = (): boolean => {
|
||||||
const isLoggedIn = check_login_status();
|
const isLoggedIn = check_login_status();
|
||||||
|
|
||||||
if (!isLoggedIn) {
|
if (!isLoggedIn) {
|
||||||
navigateToLogin();
|
navigateToLogin();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -62,25 +62,25 @@ export const requireLoginWithPhone = (): boolean => {
|
|||||||
navigateToLogin();
|
navigateToLogin();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否有手机号
|
// 检查是否有手机号
|
||||||
// 优先从 store 中获取用户信息
|
// 优先从 store 中获取用户信息
|
||||||
const userInfo = useUser.getState().user;
|
const userInfo = useUser.getState().user;
|
||||||
let phone = (userInfo as any)?.phone;
|
let phone = (userInfo as any)?.phone;
|
||||||
|
|
||||||
// 如果 store 中没有,尝试从本地存储获取
|
// 如果 store 中没有,尝试从本地存储获取
|
||||||
if (!phone || phone.trim() === '') {
|
if (!phone || phone.trim() === '') {
|
||||||
const localUserInfo = get_user_info();
|
const localUserInfo = get_user_info();
|
||||||
phone = localUserInfo?.phone;
|
phone = localUserInfo?.phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果用户信息中没有手机号,或者手机号为空
|
// 如果用户信息中没有手机号,或者手机号为空
|
||||||
if (!phone || phone.trim() === '') {
|
if (!phone || phone.trim() === '') {
|
||||||
console.log('用户未绑定手机号,跳转到登录页绑定');
|
console.log('用户未绑定手机号,跳转到登录页绑定');
|
||||||
navigateToLogin();
|
navigateToLogin();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user