tiefen_space_h5/api/streamer.js

24 lines
575 B
JavaScript
Raw Normal View History

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);
}
};