diff --git a/app/my/setting/aboutUs/page.js b/app/my/setting/aboutUs/page.js index 82e6cd1..74d005b 100644 --- a/app/my/setting/aboutUs/page.js +++ b/app/my/setting/aboutUs/page.js @@ -28,8 +28,12 @@ export default function AboutUs() {

关于我们

{/* 内容 */} -
- +
+
    diff --git a/app/my/setting/feedback/page.js b/app/my/setting/feedback/page.js index 15e68bb..43e9a06 100644 --- a/app/my/setting/feedback/page.js +++ b/app/my/setting/feedback/page.js @@ -11,7 +11,8 @@ import { multiUploadImage } from "@/utils/upload"; import requireAPI from "@/utils/requireAPI"; export default function Feedback() { const [value, setValue] = useState(); - const [assets, setAssets] = useState([]); + const [imgAssets, setImgAssets] = useState([]); + const [videoAssets, setVideoAssets] = useState([]); const [isSubmitting, setIsSubmitting] = useState(false); const router = useRouter(); //提交反馈 @@ -24,13 +25,26 @@ export default function Feedback() { }); return; } - + if (imgAssets.length + videoAssets.length > 9) { + Toast.show({ + icon: "fail", + content: "最多上传9个图片或视频", + position: "top", + }); + return; + } //提交数据 setIsSubmitting(true); // const media = await multiUpload(assets); - const media = await multiUploadImage(assets, 1); + const { image_ids } = await multiUploadImage(imgAssets, 1); + const { video_ids } = await multiUploadImage(videoAssets, 2); + + const media = { image_ids, video_ids }; + // console.log("media",media) const account = await get("account"); + debugger; + try { const data = await requireAPI( "POST", @@ -93,9 +107,24 @@ export default function Feedback() { style={{ "--placeholder-color": "#FFFFFF80", "--font-size": "16px" }} />

    - 截图(最多9张) + 截图或录屏(最多9张)

    - +
    +

    图片

    + +
    +

    视频

    +