tiefen_space_h5/api/streamer.js

24 lines
557 B
JavaScript
Raw Normal View History

2024-08-05 15:48:59 +08:00
import requireAPI from "@/utils/requireAPI";
import { Toast } from "antd-mobile";
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) {
Toast.show({
icon: "fail",
content: data.msg,
position: "top",
});
return;
}
return {
...data.data,
};
} catch (error) {
console.error(error);
}
};