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