修復存在的問題
This commit is contained in:
parent
9b85ccb8bb
commit
ce40a40489
|
@ -123,7 +123,7 @@ export default function Home() {
|
|||
<div
|
||||
// onClick={() => setIsCreatePostModalVisible(!isCreatePostModalVisible)}
|
||||
className="fixed right-6 bottom-16"
|
||||
style={{ zIndex: 999 }}
|
||||
style={{ zIndex: 99 }}
|
||||
onClick={() => {
|
||||
router.push("/streamerPosts/createPost");
|
||||
}}
|
||||
|
|
|
@ -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"
|
||||
/>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -14,7 +14,7 @@ export default function AddToHome() {
|
|||
}, []);
|
||||
return firstLogin.first == "1" ? (
|
||||
<div
|
||||
className="fixed z-[50]"
|
||||
className="fixed z-[100]"
|
||||
style={{ bottom: !firstLogin.second ? "57px" : "0" }}
|
||||
>
|
||||
{!firstLogin.second ? (
|
||||
|
|
|
@ -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({
|
|||
) : (
|
||||
<p className="py-1 px-2 inline-block bg-[#F53030] rounded">
|
||||
<span className="text-sm">
|
||||
审核未通过,请删除后重新提交。{type}
|
||||
审核未通过,请删除后重新提交。
|
||||
</span>
|
||||
</p>
|
||||
))}
|
||||
|
@ -397,13 +397,13 @@ export default function PostItem({
|
|||
编辑
|
||||
</li>
|
||||
<hr className="border-[#ffffff2b] my-1" />
|
||||
<li className="py-1 px-4" onClick={handleDelete}>
|
||||
<li className="py-1 px-4" onClick={()=>handleDelete("space")}>
|
||||
删除
|
||||
</li>
|
||||
</>
|
||||
) : type == "post" && account?.mid == data?.mid ? (
|
||||
<>
|
||||
<li className="py-1 px-4" onClick={handleDelete}>
|
||||
<li className="py-1 px-4" onClick={()=>handleDelete("post")}>
|
||||
删除
|
||||
</li>
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue