适应付费文案新版本

This commit is contained in:
yezian 2024-05-17 20:58:18 +08:00
parent 31f34febd0
commit 88be15c308
2 changed files with 109 additions and 3 deletions

View File

@ -47,6 +47,11 @@ const EditSpacePostContent = (props) => {
<p className="text-red-400">
文案<span className="text-black">{data.content}</span>
</p>
{data.is_creating_paid_text === 1 && (
<p className="text-red-400">
付费文案<span className="text-black">{data.paid_text}</span>
</p>
)}
</div>
<p className="text-red-400">媒体</p>
<div className="flex flex-wrap gap-1">
@ -248,6 +253,8 @@ const EditSpacePostContent = (props) => {
body: JSON.stringify({
id: defaultValues.momentId,
text: value.content,
is_creating_paid_text: defaultValues.content.is_creating_paid_text,
paid_text: value?.paid_text,
media_component: {
image_ids: imageIds,
video_ids: videoIds,
@ -371,7 +378,13 @@ const EditSpacePostContent = (props) => {
content: {
status: item.status,
media: item.media_component,
content: item.text,
content: item.paid_text
? item.text.slice(0, item.text.length - item.paid_text.length)
: item.text,
paid_text: item.paid_text
? item.paid_text.substring(1)
: item.paid_text,
is_creating_paid_text: item.is_creating_paid_text,
},
paymentSettings: {
c_type: item.c_type,
@ -444,7 +457,7 @@ const EditSpacePostContent = (props) => {
*请确保文案不为空图片数不超过30视频数不超过1图片视频不同时存在
</p>
<Form className="mt-4 flex flex-col" onFinish={handleChange}>
<Space>
<Space direction="vertical">
<Form.Item
label="文案"
name="content"
@ -459,6 +472,22 @@ const EditSpacePostContent = (props) => {
>
<TextArea />
</Form.Item>
{defaultValues.content.is_creating_paid_text === 1 && (
<Form.Item
label="付费文案"
name="paid_text"
initialValue={defaultValues.content.paid_text}
rules={[
{
required: true,
message: "请填写付费文案",
},
]}
style={{ margin: 0 }}
>
<TextArea />
</Form.Item>
)}
</Space>
{defaultMedia.image_ids.length !== 0 && (
<div className="flex flex-row flex-wrap gap-2 mt-4">

View File

@ -40,6 +40,11 @@ const ZonePostMachineReviewContent = (props) => {
<p className="text-red-400">
文案<span className="text-black">{data.text}</span>
</p>
{data.is_creating_paid_text === 1 && (
<p className="text-red-400">
付费文案<span className="text-black">{data.paid_text}</span>
</p>
)}
</div>
<p className="text-red-400">媒体</p>
<div className="flex flex-wrap gap-1">
@ -53,6 +58,63 @@ const ZonePostMachineReviewContent = (props) => {
</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: "审核结果",
dataIndex: "info",
@ -202,7 +264,22 @@ const ZonePostMachineReviewContent = (props) => {
creator: item.streamer_ext,
content: {
media: item.media_component,
text: item.text,
text: item.paid_text
? item.text.slice(0, item.text.length - item.paid_text.length)
: item.text,
paid_text: item.paid_text
? item.paid_text.substring(1)
: item.paid_text,
is_creating_paid_text: item.is_creating_paid_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: {
image_audit_status: item.image_audit_status,