From 463ec31bdf1a4f364d069c4e33d39358369c6254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Sat, 8 Nov 2025 13:10:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=96=E4=BA=BA=E9=A1=B5=E4=BF=AE=E5=A4=8Did?= =?UTF-8?q?=20=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/user_pages/other/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/user_pages/other/index.tsx b/src/user_pages/other/index.tsx index aae0f21..114a636 100644 --- a/src/user_pages/other/index.tsx +++ b/src/user_pages/other/index.tsx @@ -19,6 +19,14 @@ const OtherUserPage: React.FC = () => { // 获取页面参数 const instance = Taro.getCurrentInstance(); const user_id = instance.router?.params?.userid; + if(!user_id) { + Taro.showToast({ + title: "用户不存在", + icon: "none", + duration: 2000, + }); + Taro.navigateBack(); + } // 模拟用户数据 const [user_info, setUserInfo] = useState>({