修复bug
This commit is contained in:
parent
a9b694bce8
commit
91b8399554
|
@ -131,7 +131,7 @@ export default function CreateImagePost({ navigation, route }) {
|
|||
});
|
||||
return;
|
||||
}
|
||||
if (isCreatingPaidText && !paidText) {
|
||||
if (isCreatingPaidText && price > 0 && !paidText) {
|
||||
Toast.show({
|
||||
type: "error",
|
||||
text1: "请填写付费文案",
|
||||
|
@ -160,8 +160,8 @@ export default function CreateImagePost({ navigation, route }) {
|
|||
? parseInt(imageVisibleRange, 10)
|
||||
: 1,
|
||||
price: parseFloat(price) ? parseInt(parseFloat(price) * 100, 10) : null,
|
||||
is_creating_paid_text: isCreatingPaidText ? 1 : 0,
|
||||
paid_text: paidText,
|
||||
is_creating_paid_text: isCreatingPaidText && price > 0 ? 1 : 0,
|
||||
paid_text: isCreatingPaidText && price > 0 ? paidText : null,
|
||||
};
|
||||
const signature = await generateSignature(body);
|
||||
const response = await fetch(
|
||||
|
@ -326,7 +326,7 @@ export default function CreateImagePost({ navigation, route }) {
|
|||
"h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 mb-4 p-2"
|
||||
)}
|
||||
/>
|
||||
{isCreatingPaidText && (
|
||||
{isCreatingPaidText && price > 0 && (
|
||||
<>
|
||||
<Text style={tailwind("text-base font-medium text-white")}>
|
||||
付费文案
|
||||
|
|
|
@ -109,7 +109,7 @@ export default function CreateVideoPost({ navigation, route }) {
|
|||
});
|
||||
return;
|
||||
}
|
||||
if (isCreatingPaidText && !paidText) {
|
||||
if (isCreatingPaidText && price > 0 && !paidText) {
|
||||
Toast.show({
|
||||
type: "error",
|
||||
text1: "请填写付费文案",
|
||||
|
@ -136,8 +136,8 @@ export default function CreateVideoPost({ navigation, route }) {
|
|||
: 999,
|
||||
is_blurring_cover: blurCover ? 1 : 0,
|
||||
price: parseFloat(price) ? parseInt(parseFloat(price) * 100, 10) : null,
|
||||
is_creating_paid_text: isCreatingPaidText ? 1 : 0,
|
||||
paid_text: paidText,
|
||||
is_creating_paid_text: isCreatingPaidText && price > 0 ? 1 : 0,
|
||||
paid_text: isCreatingPaidText && price > 0 ? paidText : null,
|
||||
};
|
||||
const signature = await generateSignature(body);
|
||||
const response = await fetch(
|
||||
|
@ -302,7 +302,7 @@ export default function CreateVideoPost({ navigation, route }) {
|
|||
"h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 mb-4 p-2"
|
||||
)}
|
||||
/>
|
||||
{isCreatingPaidText && (
|
||||
{isCreatingPaidText && price > 0 && (
|
||||
<>
|
||||
<Text style={tailwind("text-base font-medium text-white")}>
|
||||
付费文案
|
||||
|
|
|
@ -222,7 +222,7 @@ export default function EditSpacePost({ navigation, route }) {
|
|||
});
|
||||
return;
|
||||
}
|
||||
if (isCreatingPaidText && !paidText) {
|
||||
if (isCreatingPaidText && price > 0 && !paidText) {
|
||||
Toast.show({
|
||||
type: "error",
|
||||
text1: "请填写付费文案",
|
||||
|
@ -260,8 +260,8 @@ export default function EditSpacePost({ navigation, route }) {
|
|||
is_blurring_cover: blurCover ? 1 : 0,
|
||||
is_ironfan_visible: isFreeForIronfan ? 1 : 0,
|
||||
price: parseFloat(price) ? parseInt(parseFloat(price) * 100, 10) : null,
|
||||
is_creating_paid_text: isCreatingPaidText ? 1 : 0,
|
||||
paid_text: paidText,
|
||||
is_creating_paid_text: isCreatingPaidText && price > 0 ? 1 : 0,
|
||||
paid_text: isCreatingPaidText && price > 0 ? paidText : null,
|
||||
};
|
||||
const signature = await generateSignature(body);
|
||||
const _response = await fetch(
|
||||
|
@ -372,7 +372,7 @@ export default function EditSpacePost({ navigation, route }) {
|
|||
"h-32 bg-[#FFFFFF1A] text-white rounded-2xl mt-2 mb-4 p-2"
|
||||
)}
|
||||
/>
|
||||
{isCreatingPaidText && (
|
||||
{isCreatingPaidText && price > 0 && (
|
||||
<>
|
||||
<Text style={tailwind("text-base font-medium text-white")}>
|
||||
付费文案
|
||||
|
|
Loading…
Reference in New Issue