diff --git a/src/views/ApplyView.vue b/src/views/ApplyView.vue index cbc88b6..02a2d92 100644 --- a/src/views/ApplyView.vue +++ b/src/views/ApplyView.vue @@ -173,28 +173,12 @@ const searchTeamAccount = async (account) => { return response.body.teamProfile.id // 返回团队ID } else { searchedTeamInfo.value = null - throw new Error('Team not found or invalid account') + showError(response.errorMsg) } } catch (error) { - console.error('搜索团队失败:', error) searchedTeamInfo.value = null + showError(error.errorMsg) - if (error instanceof ApiError) { - if (error.type === 'business') { - switch (error.errorCode) { - case 6010: - throw new Error('Account not found or not an agent') - case 6001: - throw new Error('Invalid account format') - default: - throw new Error(error.errorMsg || 'Failed to search account') - } - } else { - throw new Error('Network error, please check your connection') - } - } else { - throw new Error('Failed to search account') - } } }