"use client";
import React, { useRef, useState } from "react";
import { Image } from "antd-mobile";
import { useRouter } from "next/navigation";
import baseRequest from "@/utils/baseRequest";
export default function PaySpacePost({
type = "ironFan",
status = 0,
is_ironfan_visible = false,
data = {},
isCreator,
}) {
const base = baseRequest();
const router = useRouter();
return (
<>
{isCreator ? (
{data.price / 100}
元
共{data.buyer_cnt}人购买
{/*
*/}
{data.is_ironfan_visible === 1 && (
空间内任意消费满{data.ironfanship_price / 100}元即可成为铁粉
)}
) : (
{
if (!data.is_zone_moment_unlocked) {
router.push(
"/webView/" +
encodeURIComponent(
"/zone/pay/" +
data?.zid +
"/h5_zone_moment/" +
data?.id +
"?base=" +
encodeURIComponent(JSON.stringify(base))
)
);
}
}}
>
{!data.is_zone_moment_unlocked ? (
{data.is_ironfan_visible === 1
? "铁粉免费查看"
: data.is_superfanship_enabled === 1
? "超粉免费查看"
: "付费解锁"}
) : (
{data.is_ironfanship_unlocked === 1 &&
data.is_ironfan_visible === 1 &&
"已使用铁粉特权解锁"}
{data.is_superfanship_unlocked === 1 &&
data.is_ironfan_visible === 0 &&
"已使用超粉特权解锁"}
{data.is_superfanship_unlocked === 0 &&
data.is_ironfan_visible === 0 &&
"已付费解锁"}
{data.is_ironfanship_unlocked === 0 &&
data.is_ironfan_visible === 1 &&
"已付费解锁"}
)}
{is_ironfan_visible && (
空间内任意消费满{data.ironfanship_price / 100}元即可成为铁粉
)}
)}
>
);
}