"use client"; import React, { useState } from "react"; import { Button, TextArea,Toast } from "antd-mobile"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleLeft } from "@fortawesome/free-solid-svg-icons"; import { useRouter } from "next/navigation"; import UploadImgs from "@/components/UploadImgs"; import { get } from "@/utils/storeInfo"; export default function Feedback() { const [value, setValue] = useState(); const [assets, setAssets] = useState([]); const [isSubmitting, setIsSubmitting] = useState(false); const router = useRouter(); //提交反馈 const handleSubmit = async () => { if (!value) { Toast.show({ icon: "fail", content: "反馈内容不能为空", position: "top", }); return; } // const media = await multiUpload(assets); console.log("media",{image_ids:assets,video_ids:[]}) // //提交数据 // setIsSubmitting(true); // const media = await multiUpload(assets); // const account = await get("account"); // try { // const data = await require("POST", `/api/feedback/create`, { // body: { // mid: account.mid, // discription: value, // credentials: media, // }, // }); // if (data.ret === -1) { // Toast.show({ // icon: "fail", // content: data.msg, // position: "top", // }); // return; // } // //提交成功后显示Toast并返回上一页 // Toast.show({ // icon: "success", // content: "反馈提交成功", // position: "top", // }); // router.goBack(); // } catch (error) { // console.error(error); // } finally { // setIsSubmitting(false); // } }; return (
{ router.back(); }} />

意见反馈

{/* 内容 */}

反馈描述