apply 页面提示优化

This commit is contained in:
tianfeng 2025-09-05 22:08:25 +08:00
parent 19d679c468
commit d962fe9102

View File

@ -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')
}
}
}