feat: 撤回意外的修改

This commit is contained in:
2025-04-28 04:09:26 +08:00
parent 8b908f5ac9
commit 0591d0575d

View File

@@ -10,21 +10,17 @@ export const AUTHOR_TYPE_TO_TEXT = [
'owner' // 主播
]
import * as i18n from '@/i18n'
const GUARD_LEVEL_TO_TEXT_KEY = [
'',
'chat.guardLevel1',
'chat.guardLevel2',
'chat.guardLevel3'
]
export function getShowGuardLevelText(guardLevel) {
let key = GUARD_LEVEL_TO_TEXT_KEY[guardLevel] || ''
if (key === '') {
switch (guardLevel) {
case 1:
return '总督'
case 2:
return '提督'
case 3:
return '舰长'
default:
return ''
}
return i18n.i18n.t(key)
}
export const MESSAGE_TYPE_TEXT = 0
@@ -199,7 +195,7 @@ export function getGiftShowContent(message, showGiftName) {
if (!showGiftName) {
return ''
}
return i18n.i18n.t('chat.sendGift', { giftName: message.giftName, num: message.num })
return `赠送 ${message.giftName}x${message.num}`
}
export function getGiftShowNameAndNum(message) {