import React from "react"; import { Form, Input, Space, Button, message } from "antd"; import baseRequest from "../../utils/baseRequest"; export default function RollbackUserLeaveSpace() { const [form] = Form.useForm(); const rollback = async (value) => { if (!value.userid || !value.streamer_userid) { alert("请填写用户和主播的ID"); return; } try { const base = baseRequest(); const response = await fetch(`/op/vas/rollback_zone_exit_status`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ userid: parseInt(value.userid, 10), streamer_userid: parseInt(value.streamer_userid, 10), ...base, }), }); const data = await response.json(); console.log(data); if (data.ret === -1) { alert(data.msg); return; } form.resetFields(); message.success("恢复成功"); } catch (error) { console.error(error); } }; //表单提交失败 const onFinishFailed = (errorInfo) => { console.log("Failed:", errorInfo); }; return (

该功能只适用于用户加入空间后误操作点击退出空间后需要恢复的情况

); }