增加付费内容提示
This commit is contained in:
parent
83dcbacf3d
commit
b8fa171a65
|
@ -384,7 +384,7 @@ export default function CreateProfile() {
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2 px-4 py-3 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
<div className="mt-2 px-4 py-3 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
||||||
<TextArea
|
<TextArea
|
||||||
value={formData.info}
|
value={formData.spaceIntro}
|
||||||
placeholder="介绍下你的空间吧~"
|
placeholder="介绍下你的空间吧~"
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
setFormData((old) => ({ ...old, spaceIntro: value }))
|
setFormData((old) => ({ ...old, spaceIntro: value }))
|
||||||
|
|
|
@ -151,7 +151,7 @@ export default function spacePaymentSetting() {
|
||||||
setSuperSingleChecked(res.superfanship_valid_period);
|
setSuperSingleChecked(res.superfanship_valid_period);
|
||||||
}
|
}
|
||||||
const newFormData = {
|
const newFormData = {
|
||||||
spacePrice: res.admission_price / 100,
|
spacePrice: `${res.admission_price / 100}`,
|
||||||
ironFanPrice: res.ironfanship_price / 100,
|
ironFanPrice: res.ironfanship_price / 100,
|
||||||
openSuper: !!res.is_superfanship_enabled,
|
openSuper: !!res.is_superfanship_enabled,
|
||||||
superSingle: formData.superSingle.map((it, index) => {
|
superSingle: formData.superSingle.map((it, index) => {
|
||||||
|
@ -212,6 +212,8 @@ export default function spacePaymentSetting() {
|
||||||
const openSuperEveryFalse = Object.values(superSingle).every(
|
const openSuperEveryFalse = Object.values(superSingle).every(
|
||||||
(it) => !it.enable
|
(it) => !it.enable
|
||||||
);
|
);
|
||||||
|
debugger;
|
||||||
|
|
||||||
if (!spacePrice || !ironFanPrice || (openSuper && openSuperEveryFalse)) {
|
if (!spacePrice || !ironFanPrice || (openSuper && openSuperEveryFalse)) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
icon: "fail",
|
icon: "fail",
|
||||||
|
@ -220,6 +222,7 @@ export default function spacePaymentSetting() {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _spacePrice = parseInt(spacePrice * 100, 10);
|
const _spacePrice = parseInt(spacePrice * 100, 10);
|
||||||
if (isNaN(_spacePrice) || _spacePrice < 0 || _spacePrice > 388800) {
|
if (isNaN(_spacePrice) || _spacePrice < 0 || _spacePrice > 388800) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
|
|
|
@ -19,6 +19,7 @@ export default function Photos({
|
||||||
media,
|
media,
|
||||||
type,
|
type,
|
||||||
data,
|
data,
|
||||||
|
isCreator = false,
|
||||||
}) {
|
}) {
|
||||||
const [seeAllPhotos, setSeeAllPhotos] = useState(false);
|
const [seeAllPhotos, setSeeAllPhotos] = useState(false);
|
||||||
const [currentPhotos, setCurrentPhotos] = useState([]);
|
const [currentPhotos, setCurrentPhotos] = useState([]);
|
||||||
|
@ -264,7 +265,7 @@ export default function Photos({
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
<div
|
<div
|
||||||
className={`overflow-hidden rounded h-full ${
|
className={`overflow-hidden rounded h-full relative ${
|
||||||
currentPhotos.length > 1 ? "h-[24vw]" : ""
|
currentPhotos.length > 1 ? "h-[24vw]" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
@ -293,6 +294,14 @@ export default function Photos({
|
||||||
fit={currentPhotos.length > 1 ? "cover" : "contain"}
|
fit={currentPhotos.length > 1 ? "cover" : "contain"}
|
||||||
src={item?.url}
|
src={item?.url}
|
||||||
/>
|
/>
|
||||||
|
{!item?.mp4 &&
|
||||||
|
isCreator &&
|
||||||
|
mediaVisibleRange < index + 1 &&
|
||||||
|
data.c_type === 1 && (
|
||||||
|
<div className="absolute bottom-0 py-1 flex justify-center w-full bg-[#00000080]">
|
||||||
|
<p className="text-sm">付费内容</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{item?.mp4 && (
|
{item?.mp4 && (
|
||||||
|
|
|
@ -254,6 +254,7 @@ export default function PostItem({
|
||||||
mediaAmount={data.media_amount}
|
mediaAmount={data.media_amount}
|
||||||
mediaVisibleRange={data.media_visible_range}
|
mediaVisibleRange={data.media_visible_range}
|
||||||
type={type}
|
type={type}
|
||||||
|
isCreator={isCreator}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{type == "space" && !!data.c_type && (
|
{type == "space" && !!data.c_type && (
|
||||||
|
|
Loading…
Reference in New Issue