为空间内动态增加付费设置信息

This commit is contained in:
yezian 2024-05-14 23:21:41 +08:00
parent 2228e37f3d
commit 31f34febd0
1 changed files with 67 additions and 0 deletions

View File

@ -60,6 +60,63 @@ const EditSpacePostContent = (props) => {
</div> </div>
), ),
}, },
{
title: "付费设置",
dataIndex: "paymentSettings",
key: "paymentSettings",
render: (data) => (
<div className="flex flex-col">
<p className="text-red-400">
类型
<span className="text-black">
{data.c_type === 0 ? "免费" : "付费"}
</span>
</p>
{data.c_type === 1 && (
<div>
<hr />
<p className="text-red-400">
价格
<span className="text-black">¥{data.price}</span>
</p>
<hr />
<p className="text-red-400">
是否铁粉免费看
<span className="text-black">
{data.is_ironfan_visible === 0 ? "否" : "是"}
</span>
</p>
<hr />
<p className="text-red-400">
文案可见行数
<span className="text-black">{data.text_visible_range}</span>
</p>
{data.m_type === 1 ? (
<>
<hr />
<p className="text-red-400">
图片可见张数
<span className="text-black">
{data.media_visible_range}
</span>
</p>
</>
) : (
<>
<hr />
<p className="text-red-400">
是否模糊封面
<span className="text-black">
{data.is_blurring_cover === 0 ? "否" : "是"}
</span>
</p>
</>
)}
</div>
)}
</div>
),
},
{ {
title: "审核结果", title: "审核结果",
dataIndex: "info", dataIndex: "info",
@ -299,6 +356,7 @@ const EditSpacePostContent = (props) => {
}), }),
}); });
const detailData = await detailResponse.json(); const detailData = await detailResponse.json();
console.log(detailData.data);
if (detailData.ret === -1) { if (detailData.ret === -1) {
alert(detailData.msg); alert(detailData.msg);
return; return;
@ -315,6 +373,15 @@ const EditSpacePostContent = (props) => {
media: item.media_component, media: item.media_component,
content: item.text, content: item.text,
}, },
paymentSettings: {
c_type: item.c_type,
m_type: item.m_type,
price: item.price / 100,
is_ironfan_visible: item.is_ironfan_visible,
text_visible_range: item.text_visible_range,
media_visible_range: item.media_visible_range,
is_blurring_cover: item.is_blurring_cover,
},
info: { info: {
image_audit_status: item.image_audit_status, image_audit_status: item.image_audit_status,
image_audit_opinion: item.image_audit_opinion, image_audit_opinion: item.image_audit_opinion,