mirror of
https://github.com/xfgryujk/blivechat.git
synced 2026-08-19 09:43:28 +08:00
修改金额、时间格式
This commit is contained in:
@@ -21,7 +21,7 @@ export default {
|
||||
disabledByServer: 'Disabled by the server',
|
||||
|
||||
general: 'General',
|
||||
useAuthCodeWarning: 'Please prioritize the identity code, otherwise the avatars and usernames will not display',
|
||||
useAuthCodeWarning: 'Please prioritize the identity code, otherwise usernames will not display and you may not be able to receive messages at any time',
|
||||
room: 'Room',
|
||||
roomId: 'Room ID (not recommended)',
|
||||
authCode: 'Identity code',
|
||||
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
disabledByServer: 'サーバーによって無効にされました',
|
||||
|
||||
general: '常規',
|
||||
useAuthCodeWarning: 'アイデンティティコードを優先的に使用してください。そうしないと、アイコンやユーザー名が表示されません',
|
||||
useAuthCodeWarning: 'アイデンティティコードを優先的に使用してください。そうしないと、ユーザー名が表示されず、コメントを受信できなくなる可能性があります',
|
||||
room: 'ルーム',
|
||||
roomId: 'ルームID(推奨されません)',
|
||||
authCode: 'アイデンティティコード',
|
||||
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
disabledByServer: '已被服务器禁用',
|
||||
|
||||
general: '常规',
|
||||
useAuthCodeWarning: '请优先使用身份码,否则无法显示头像和昵称',
|
||||
useAuthCodeWarning: '请优先使用身份码,否则无法显示昵称,并且随时可能无法获取弹幕',
|
||||
room: '房间',
|
||||
roomId: '房间ID(不推荐)',
|
||||
authCode: '身份码',
|
||||
|
||||
@@ -30,13 +30,21 @@ export function toFloat(val, _default) {
|
||||
}
|
||||
|
||||
export function formatCurrency(price) {
|
||||
let minimumFractionDigits
|
||||
if (price < 10) {
|
||||
minimumFractionDigits = 2
|
||||
} else if (price < 100) {
|
||||
minimumFractionDigits = 1
|
||||
} else {
|
||||
minimumFractionDigits = 0
|
||||
}
|
||||
return new Intl.NumberFormat('zh-CN', {
|
||||
minimumFractionDigits: price < 100 ? 2 : 0
|
||||
minimumFractionDigits
|
||||
}).format(price)
|
||||
}
|
||||
|
||||
export function getTimeTextHourMin(date) {
|
||||
let hour = date.getHours()
|
||||
let hour = `00${date.getHours()}`.slice(-2)
|
||||
let min = `00${date.getMinutes()}`.slice(-2)
|
||||
return `${hour}:${min}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user