diff --git a/app/page.js b/app/page.js index c8228c9..14eb7fc 100644 --- a/app/page.js +++ b/app/page.js @@ -123,7 +123,7 @@ export default function Home() {
setIsCreatePostModalVisible(!isCreatePostModalVisible)} className="fixed right-6 bottom-16" - style={{ zIndex: 999 }} + style={{ zIndex: 99 }} onClick={() => { router.push("/streamerPosts/createPost"); }} diff --git a/app/space/editSpacePost/[zid]/page.jsx b/app/space/editSpacePost/[zid]/page.jsx index 59e9725..a4f7a77 100644 --- a/app/space/editSpacePost/[zid]/page.jsx +++ b/app/space/editSpacePost/[zid]/page.jsx @@ -316,7 +316,7 @@ export default function EditSpacePost() { })) } autoSize={{ minRows: 6, maxRows: 15 }} - value={formData.paidText && formData.paidText.slice(2)} + value={formData.paidText.includes("\n") ? formData.paidText.slice(2): formData.paidText} style={{ "--font-size": "14px" }} className="bg-[#FFFFFF1A] rounded-2xl mt-2 mb-4 p-2 h-full" /> diff --git a/app/streamerPosts/createPost/page.jsx b/app/streamerPosts/createPost/page.jsx index d23f22b..1f06513 100644 --- a/app/streamerPosts/createPost/page.jsx +++ b/app/streamerPosts/createPost/page.jsx @@ -63,14 +63,17 @@ export default function CreatePost() { //提交数据 if (isSubmitting) return; setIsSubmitting(true); - const { content, imageAssets } = formData; - const newMedia = imageAssets.filter((it) => it.id == undefined); - const media = await multiUploadImage(newMedia, 1); + const { content, imageAssets, videoAssets} = formData; + const newImageMedia = imageAssets.filter((it) => it.id == undefined); + const type = formData.imageAssets.length > 0 ? 1 : 2; + const media = await multiUploadImage(type==1?newImageMedia:videoAssets, type); // const media = await multiUploadImage(imageAssets); - media.image_ids = [ - ...imageAssets.filter((it) => it.id != undefined).map((it) => it.id), - ...media.image_ids, - ]; + if(type==1){ + media.image_ids = [ + ...imageAssets.filter((it) => it.id != undefined).map((it) => it.id), + ...media.image_ids, + ]; + } try { const body = { text: content, diff --git a/components/AddToHome/index.jsx b/components/AddToHome/index.jsx index eb1fc6b..9965433 100644 --- a/components/AddToHome/index.jsx +++ b/components/AddToHome/index.jsx @@ -14,7 +14,7 @@ export default function AddToHome() { }, []); return firstLogin.first == "1" ? (
{!firstLogin.second ? ( diff --git a/components/PostItem/index.js b/components/PostItem/index.js index 5e39a65..2a45fe3 100644 --- a/components/PostItem/index.js +++ b/components/PostItem/index.js @@ -77,9 +77,9 @@ export default function PostItem({ if (time === 1) return "昨日"; return `${time}日前`; }, []); - const handleDelete = async () => { + const handleDelete = async (type) => { try { - const _data = await requireAPI("POST", "/api/zone_moment/delete", { + const _data = await requireAPI("POST", `/api/${type=="space"?"zone_moment":"moment"}/delete`, { body: { id: data?.id, }, @@ -196,7 +196,7 @@ export default function PostItem({ ) : (

- 审核未通过,请删除后重新提交。{type} + 审核未通过,请删除后重新提交。

))} @@ -397,13 +397,13 @@ export default function PostItem({ 编辑
-
  • +
  • handleDelete("space")}> 删除
  • ) : type == "post" && account?.mid == data?.mid ? ( <> -
  • +
  • handleDelete("post")}> 删除