用户封禁页面支持搜索
This commit is contained in:
parent
5f3d82ebfe
commit
91abe5a96c
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue