1
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
.customerNavbar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 99;
|
|
||||||
width: 100%;
|
|
||||||
// 背景颜色通过 style 动态设置,默认 #FAFAFA
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { View } from "@tarojs/components";
|
|
||||||
import styles from "./index.module.scss";
|
|
||||||
import { useGlobalState } from "@/store/global";
|
|
||||||
|
|
||||||
interface IProps {
|
|
||||||
children: any;
|
|
||||||
backgroundColor?: string; // 背景颜色,不设置则透明
|
|
||||||
}
|
|
||||||
|
|
||||||
const CustomNavbar = (props: IProps) => {
|
|
||||||
const { children, backgroundColor } = props;
|
|
||||||
const { statusNavbarHeightInfo } = useGlobalState();
|
|
||||||
const { statusBarHeight, navBarHeight } = statusNavbarHeightInfo;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View
|
|
||||||
className={styles.customerNavbar}
|
|
||||||
style={{
|
|
||||||
height: `${statusBarHeight + navBarHeight}px`,
|
|
||||||
backgroundColor: backgroundColor || 'transparent'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
export default CustomNavbar;
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { View, Text, ScrollView } from '@tarojs/components';
|
import { View, Text, ScrollView } from '@tarojs/components';
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
import CustomNavbar from '@/components/CustomNavbar';
|
import { GeneralNavbar } from '@/components';
|
||||||
import FollowUserCard from '@/components/FollowUserCard';
|
import FollowUserCard from '@/components/FollowUserCard';
|
||||||
import { FollowService, FollowUser } from '@/services/followService';
|
import { FollowService, FollowUser } from '@/services/followService';
|
||||||
import { withAuth } from '@/components';
|
import { withAuth } from '@/components';
|
||||||
@@ -235,17 +235,12 @@ const FollowPage: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<View className="follow_page">
|
<View className="follow_page">
|
||||||
{/* 自定义导航栏 */}
|
{/* 自定义导航栏 */}
|
||||||
<CustomNavbar backgroundColor="#FAFAFA">
|
<GeneralNavbar
|
||||||
<View className="navbar_content">
|
title="粉丝"
|
||||||
<View className="navbar_back" onClick={() => Taro.navigateBack()}>
|
titlePosition="left"
|
||||||
<View className="back_icon" />
|
backgroundColor="#FAFAFA"
|
||||||
</View>
|
showBack={true}
|
||||||
<Text className="navbar_title">粉丝</Text>
|
/>
|
||||||
<View className="navbar_action">
|
|
||||||
<View className="action_icon" />
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</CustomNavbar>
|
|
||||||
|
|
||||||
{/* 标签页导航 */}
|
{/* 标签页导航 */}
|
||||||
<View className="tab_navigation">
|
<View className="tab_navigation">
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
} from "@/components/UserInfo";
|
} from "@/components/UserInfo";
|
||||||
import { UserService, UserInfoType } from "@/services/userService";
|
import { UserService, UserInfoType } from "@/services/userService";
|
||||||
import * as LoginService from "@/services/loginService";
|
import * as LoginService from "@/services/loginService";
|
||||||
import CustomNavbar from "@/components/CustomNavbar";
|
|
||||||
import { useGlobalState } from "@/store/global";
|
import { useGlobalState } from "@/store/global";
|
||||||
import { GeneralNavbar } from "@/components";
|
import { GeneralNavbar } from "@/components";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user