"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,
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}元即可成为铁粉
)}
) : (
{data.price / 100}元
{!data.is_zone_moment_unlocked ? (
router.push(
"/webView/" +
encodeURIComponent(
"/zone/pay/" +
data?.id +
"/h5_zone_moment/" +
data?.id+"?base="+encodeURIComponent(base)
)
)
}
>
{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 &&
"已付费解锁"}
)}
{status === 0 && (
空间内任何消费满{data.ironfanship_price}元即可成为铁粉
)}
)}
>
);
}