diff --git a/screeens/Posts/FeedPosts/index.jsx b/screeens/Posts/FeedPosts/index.jsx index ba23d70..d6a163c 100644 --- a/screeens/Posts/FeedPosts/index.jsx +++ b/screeens/Posts/FeedPosts/index.jsx @@ -16,10 +16,14 @@ import { generateSignature } from "../../../utils/crypto"; import Post from "../../../components/Post"; import { useNavigation } from "@react-navigation/native"; import { get } from "../../../utils/storeInfo"; +import { useVipVisibility } from "../../../context/VipVisibilityProvider"; export default function FeedPosts({ blur }) { const navigation = useNavigation(); + //查看是否展示vip功能 + const { isVipVisible } = useVipVisibility(); + //获取会员价格 const [vipPrice, setVipPrice] = useState(); const getVipPrice = async () => { @@ -61,12 +65,15 @@ export default function FeedPosts({ blur }) { const account = await get("account"); const role = account.role; const isVip = account.is_a_member; - if (role !== 0 || isVip === 1) { + const base = await baseRequest(); + if ( + base.b_ver !== "1.2.4" && + (role !== 0 || isVip === 1 || !isVipVisible) + ) { return []; } try { const apiUrl = process.env.EXPO_PUBLIC_API_URL; - const base = await baseRequest(); //查询动态id const signature = await generateSignature({ config_key: "free_moment_ids",