针对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 { 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",
|
||||
|
|
Loading…
Reference in New Issue