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