提示中文处理
This commit is contained in:
parent
7c014173fb
commit
243a8e32e4
@ -50,12 +50,12 @@
|
||||
<div v-for="record in applyRecords" :key="record.messageId" class="record-item">
|
||||
<div class="record-info">
|
||||
<div class="team-info">
|
||||
<p class="team-label">申请加入团队:</p>
|
||||
<p class="team-label">Apply to join team:</p>
|
||||
<p class="team-id">Team ID: {{ record.teamProfile?.id }}</p>
|
||||
<p class="team-country">{{ record.teamProfile?.country?.countryName }} ({{ record.teamProfile?.country?.countryCode }})</p>
|
||||
</div>
|
||||
<div class="owner-info">
|
||||
<p class="owner-label">团队所有者:</p>
|
||||
<p class="owner-label">Team owner:</p>
|
||||
<div class="owner-profile">
|
||||
<img v-if="record.ownUserProfile?.userAvatar" :src="record.ownUserProfile.userAvatar" class="owner-avatar" />
|
||||
<div>
|
||||
@ -73,7 +73,7 @@
|
||||
class="cancel-btn"
|
||||
@click="handleCancelApply(record)"
|
||||
>
|
||||
cancel
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -133,7 +133,7 @@ const handleCancelApply = async (record) => {
|
||||
applyRecords.value = [] // 清空记录
|
||||
await fetchApplyRecords()
|
||||
} else {
|
||||
showError(response.message || '撤销失败,请重试')
|
||||
showError(response.message || 'Cancellation failed, please try again')
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('撤销申请失败:', error)
|
||||
@ -142,19 +142,19 @@ const handleCancelApply = async (record) => {
|
||||
if (error.type === 'business') {
|
||||
switch (error.errorCode) {
|
||||
case 6404: // 假设的记录不存在错误码
|
||||
showError('申请记录不存在', '撤销失败')
|
||||
showError('Application record not found', 'Cancellation failed')
|
||||
break
|
||||
case 6003: // 假设的已处理错误码
|
||||
showError('申请已被处理,无法撤销', '撤销失败')
|
||||
showError('Application has been processed and cannot be canceled', 'Cancellation failed')
|
||||
break
|
||||
default:
|
||||
showError(error.errorMsg || error.message || '撤销失败,请重试', '撤销失败')
|
||||
showError(error.errorMsg || error.message || 'Cancellation failed, please try again', 'Cancellation failed')
|
||||
}
|
||||
} else {
|
||||
showError('网络错误,请检查网络后重试', '撤销失败')
|
||||
showError('Network error, please check your connection and try again', 'Cancellation failed')
|
||||
}
|
||||
} else {
|
||||
showError('撤销失败,请重试')
|
||||
showError('Cancellation failed, please try again')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -194,11 +194,11 @@ const submitApplication = async () => {
|
||||
if (error.status === 406) {
|
||||
showWarning(error.errorMsg)
|
||||
} else {
|
||||
showError(error.message || '未知错误,请重试')
|
||||
showError(error.message || 'Unknown error, please try again')
|
||||
}
|
||||
} else {
|
||||
// 非 ApiError 类型的错误
|
||||
showError('未知错误,请重试')
|
||||
showError('Unknown error, please try again')
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user