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) => {
|
|
|
|
try {
|
|
|
|
const data = await requireAPI("POST", "/api/streamer/list_ext_by_user_id", {
|
|
|
|
body: {
|
|
|
|
user_id:userId,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
if (data.ret === -1) {
|
2024-08-05 16:02:01 +08:00
|
|
|
// Toast.show({
|
|
|
|
// icon: "fail",
|
|
|
|
// content: data.msg,
|
|
|
|
// position: "top",
|
|
|
|
// });
|
2024-08-05 15:48:59 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
return {
|
|
|
|
...data.data,
|
|
|
|
};
|
|
|
|
} catch (error) {
|
|
|
|
console.error(error);
|
|
|
|
}
|
|
|
|
};
|