diff --git a/web/src/views/mobile/ChatList.vue b/web/src/views/mobile/ChatList.vue index 30b2216b..ac187116 100644 --- a/web/src/views/mobile/ChatList.vue +++ b/web/src/views/mobile/ChatList.vue @@ -170,8 +170,8 @@ checkSession().then((user) => { }) const onLoad = () => { - checkSession().then(() => { - httpGet("/api/chat/list?user_id=" + loginUser.value.id).then((res) => { + checkSession().then((user) => { + httpGet("/api/chat/list?user_id=" + user.id).then((res) => { if (res.data) { chats.value = res.data; allChats.value = res.data; @@ -182,7 +182,9 @@ const onLoad = () => { error.value = true showFailToast("加载会话列表失败") }) - }).catch(() => {}) + }).catch(() => { + finished.value = true + }) }; const search = () => {