feat: 本次提交更新内容如下
同步
This commit is contained in:
10
nkebao/src/components/GroupSelection/api.ts
Normal file
10
nkebao/src/components/GroupSelection/api.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from "@/api/request";
|
||||
|
||||
// 获取群组列表
|
||||
export function getGroupList(params: {
|
||||
page: number;
|
||||
limit: number;
|
||||
keyword?: string;
|
||||
}) {
|
||||
return request("/v1/chatroom", params, "GET");
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
RightOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { Input, Button, Popup, Toast } from "antd-mobile";
|
||||
import request from "@/api/request";
|
||||
import { getGroupList } from "./api";
|
||||
import style from "./module.scss";
|
||||
|
||||
// 群组接口类型
|
||||
@@ -81,7 +81,7 @@ export default function GroupSelection({
|
||||
params.keyword = keyword.trim();
|
||||
}
|
||||
|
||||
const res = await request("/v1/chatroom", params, "GET");
|
||||
const res = await getGroupList(params);
|
||||
|
||||
if (res && Array.isArray(res.list)) {
|
||||
setGroups(
|
||||
|
||||
Reference in New Issue
Block a user