用户封禁页面支持搜索

This commit is contained in:
yezian 2024-07-08 22:51:28 +08:00
parent 5f3d82ebfe
commit 91abe5a96c
1 changed files with 17 additions and 1 deletions

View File

@ -160,7 +160,6 @@ const BlockUserContent = (props) => {
}),
});
const _data = await _response.json();
console.log(_data);
if (_data.ret === -1) {
alert(_data.msg);
return;
@ -210,6 +209,13 @@ const BlockUserContent = (props) => {
setShowData(data);
}, [data]);
//
const search = (value) => {
value.id
? setShowData(data.filter((item) => item.user.user_id == value.id))
: setShowData(data);
};
//Modal
const [isModalVisible, setIsModalVisible] = useState(false);
@ -297,6 +303,16 @@ const BlockUserContent = (props) => {
};
return (
<div style={{ marginLeft: 20, marginRight: 20, marginTop: 20 }}>
<Form name="search" onFinish={search} onFinishFailed={onFinishFailed}>
<Space style={{ marginBottom: 20 }}>
<Form.Item label="网红ID" name="id" style={{ margin: 0 }}>
<Input />
</Form.Item>
<Button type="primary" htmlType="submit">
搜索
</Button>
</Space>
</Form>
<Button
className="mb-4"
type="primary"