2024-08-05 15:48:59 +08:00
|
|
|
import requireAPI from "@/utils/requireAPI";
|
2024-08-05 16:02:01 +08:00
|
|
|
// import { Toast } from "antd-mobile";
|
2024-08-05 15:48:59 +08:00
|
|
|
export const getStreamer = async (userId) => {
|
2024-09-09 15:34:31 +08:00
|
|
|
try {
|
|
|
|
const data = await requireAPI("POST", "/api/streamer/list_ext_by_user_id", {
|
|
|
|
body: {
|
|
|
|
user_id: userId,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
if (data.ret === -1) {
|
|
|
|
// Toast.show({
|
|
|
|
// icon: "fail",
|
|
|
|
// content: data.msg,
|
|
|
|
// position: "top",
|
|
|
|
// });
|
|
|
|
return;
|
2024-08-05 15:48:59 +08:00
|
|
|
}
|
2024-09-09 15:34:31 +08:00
|
|
|
return {
|
|
|
|
...data.data,
|
|
|
|
};
|
|
|
|
} catch (error) {
|
|
|
|
// console.error(error);
|
|
|
|
}
|
|
|
|
};
|