处理存在问题

This commit is contained in:
al 2024-08-05 16:02:01 +08:00
parent 5083619183
commit fa57a4fddf
2 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
import requireAPI from "@/utils/requireAPI";
import { Toast } from "antd-mobile";
// import { Toast } from "antd-mobile";
export const getStreamer = async (userId) => {
try {
const data = await requireAPI("POST", "/api/streamer/list_ext_by_user_id", {
@ -8,11 +8,11 @@ export const getStreamer = async (userId) => {
},
});
if (data.ret === -1) {
Toast.show({
icon: "fail",
content: data.msg,
position: "top",
});
// Toast.show({
// icon: "fail",
// content: data.msg,
// position: "top",
// });
return;
}
return {

View File

@ -14,7 +14,7 @@ export default function StreamerNavigator({
const router = useRouter();
useEffect(()=>{
getStreamer(userId).then(res=>{
userId && getStreamer(userId).then(res=>{
setStreamerInfo(res);
})
},[])