针对1.2.4版本一直展示置顶广场动态

This commit is contained in:
jueweijue 2024-05-02 22:56:41 +08:00
parent ddac6c0a86
commit 4a309fd0db
1 changed files with 9 additions and 2 deletions

View File

@ -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",