mirror of
https://github.com/xfgryujk/blivechat.git
synced 2025-01-14 14:20:58 +08:00
修复手癌
This commit is contained in:
parent
8ff3c80f6f
commit
05ce486f46
@ -63,18 +63,18 @@ const EMOTICONS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
const AUTHOR_TYPES = [
|
const AUTHOR_TYPES = [
|
||||||
{ weight: 10, value: constants.AUTHRO_TYPE_NORMAL },
|
{ weight: 10, value: constants.AUTHOR_TYPE_NORMAL },
|
||||||
{ weight: 5, value: constants.AUTHRO_TYPE_MEMBER },
|
{ weight: 5, value: constants.AUTHOR_TYPE_MEMBER },
|
||||||
{ weight: 2, value: constants.AUTHRO_TYPE_ADMIN },
|
{ weight: 2, value: constants.AUTHOR_TYPE_ADMIN },
|
||||||
{ weight: 1, value: constants.AUTHRO_TYPE_OWNER }
|
{ weight: 1, value: constants.AUTHOR_TYPE_OWNER }
|
||||||
]
|
]
|
||||||
|
|
||||||
function randGuardInfo() {
|
function randGuardInfo() {
|
||||||
let authorType = randomChoose(AUTHOR_TYPES)
|
let authorType = randomChoose(AUTHOR_TYPES)
|
||||||
let privilegeType
|
let privilegeType
|
||||||
if (authorType === constants.AUTHRO_TYPE_MEMBER) {
|
if (authorType === constants.AUTHOR_TYPE_MEMBER) {
|
||||||
privilegeType = randInt(1, 3)
|
privilegeType = randInt(1, 3)
|
||||||
} else if (authorType === constants.AUTHRO_TYPE_ADMIN) {
|
} else if (authorType === constants.AUTHOR_TYPE_ADMIN) {
|
||||||
privilegeType = randInt(0, 3)
|
privilegeType = randInt(0, 3)
|
||||||
} else {
|
} else {
|
||||||
privilegeType = 0
|
privilegeType = 0
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
:isAdmin="false" :privilegeType="privilegeType"
|
:isAdmin="false" :privilegeType="privilegeType"
|
||||||
></author-badge>
|
></author-badge>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<author-badge v-if="authorType === AUTHRO_TYPE_ADMIN" class="style-scope yt-live-chat-author-chip"
|
<author-badge v-if="authorType === AUTHOR_TYPE_ADMIN" class="style-scope yt-live-chat-author-chip"
|
||||||
isAdmin :privilegeType="0"
|
isAdmin :privilegeType="0"
|
||||||
></author-badge>
|
></author-badge>
|
||||||
<author-badge v-if="privilegeType > 0" class="style-scope yt-live-chat-author-chip"
|
<author-badge v-if="privilegeType > 0" class="style-scope yt-live-chat-author-chip"
|
||||||
@ -40,7 +40,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
AUTHRO_TYPE_ADMIN: constants.AUTHRO_TYPE_ADMIN
|
AUTHOR_TYPE_ADMIN: constants.AUTHOR_TYPE_ADMIN
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import * as i18n from '@/i18n'
|
import * as i18n from '@/i18n'
|
||||||
|
|
||||||
export const AUTHRO_TYPE_NORMAL = 0
|
export const AUTHOR_TYPE_NORMAL = 0
|
||||||
export const AUTHRO_TYPE_MEMBER = 1
|
export const AUTHOR_TYPE_MEMBER = 1
|
||||||
export const AUTHRO_TYPE_ADMIN = 2
|
export const AUTHOR_TYPE_ADMIN = 2
|
||||||
export const AUTHRO_TYPE_OWNER = 3
|
export const AUTHOR_TYPE_OWNER = 3
|
||||||
|
|
||||||
export const AUTHOR_TYPE_TO_TEXT = [
|
export const AUTHOR_TYPE_TO_TEXT = [
|
||||||
'',
|
'',
|
||||||
|
Loading…
Reference in New Issue
Block a user