针对1.2.4版本一直展示置顶广场动态
This commit is contained in:
parent
ddac6c0a86
commit
4a309fd0db
|
@ -16,10 +16,14 @@ import { generateSignature } from "../../../utils/crypto";
|
||||||
import Post from "../../../components/Post";
|
import Post from "../../../components/Post";
|
||||||
import { useNavigation } from "@react-navigation/native";
|
import { useNavigation } from "@react-navigation/native";
|
||||||
import { get } from "../../../utils/storeInfo";
|
import { get } from "../../../utils/storeInfo";
|
||||||
|
import { useVipVisibility } from "../../../context/VipVisibilityProvider";
|
||||||
|
|
||||||
export default function FeedPosts({ blur }) {
|
export default function FeedPosts({ blur }) {
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
|
|
||||||
|
//查看是否展示vip功能
|
||||||
|
const { isVipVisible } = useVipVisibility();
|
||||||
|
|
||||||
//获取会员价格
|
//获取会员价格
|
||||||
const [vipPrice, setVipPrice] = useState();
|
const [vipPrice, setVipPrice] = useState();
|
||||||
const getVipPrice = async () => {
|
const getVipPrice = async () => {
|
||||||
|
@ -61,12 +65,15 @@ export default function FeedPosts({ blur }) {
|
||||||
const account = await get("account");
|
const account = await get("account");
|
||||||
const role = account.role;
|
const role = account.role;
|
||||||
const isVip = account.is_a_member;
|
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 [];
|
return [];
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
||||||
const base = await baseRequest();
|
|
||||||
//查询动态id
|
//查询动态id
|
||||||
const signature = await generateSignature({
|
const signature = await generateSignature({
|
||||||
config_key: "free_moment_ids",
|
config_key: "free_moment_ids",
|
||||||
|
|
Loading…
Reference in New Issue