From 4a309fd0dbc8e5d898f717690d0df7b4b96b9cc4 Mon Sep 17 00:00:00 2001 From: jueweijue Date: Thu, 2 May 2024 22:56:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B91.2.4=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E5=B1=95=E7=A4=BA=E7=BD=AE=E9=A1=B6=E5=B9=BF?= =?UTF-8?q?=E5=9C=BA=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- screeens/Posts/FeedPosts/index.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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",