apply 页面提示优化
This commit is contained in:
parent
19d679c468
commit
d962fe9102
@ -173,28 +173,12 @@ const searchTeamAccount = async (account) => {
|
|||||||
return response.body.teamProfile.id // 返回团队ID
|
return response.body.teamProfile.id // 返回团队ID
|
||||||
} else {
|
} else {
|
||||||
searchedTeamInfo.value = null
|
searchedTeamInfo.value = null
|
||||||
throw new Error('Team not found or invalid account')
|
showError(response.errorMsg)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('搜索团队失败:', error)
|
|
||||||
searchedTeamInfo.value = null
|
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')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user