新增tk版 自动私信
This commit is contained in:
@@ -93,7 +93,7 @@ const props = defineProps({
|
||||
permissionKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
validator: (value) => ['bigBrother', 'crawl', 'webAi'].includes(value)
|
||||
validator: (value) => ['bigBrother', 'crawl', 'webAi', 'autotk'].includes(value)
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
@@ -120,11 +120,17 @@ const visibleIndices = ref([])
|
||||
const visibleContacts = ref([])
|
||||
|
||||
const guardKey = computed(() => `guard_${props.permissionKey}_${Date.now()}`)
|
||||
const effectivePermissionKey = computed(() => {
|
||||
if (props.permissionKey === 'webAi' && props.title.includes('TK')) {
|
||||
return 'autotk'
|
||||
}
|
||||
return props.permissionKey
|
||||
})
|
||||
|
||||
const permissionsData = ref(getPermissions())
|
||||
|
||||
const hasAccess = computed(() => {
|
||||
return permissionsData.value[props.permissionKey] === 1
|
||||
return permissionsData.value[effectivePermissionKey.value] === 1
|
||||
})
|
||||
|
||||
const pickRandomIndices = (sourceIndices, count) => {
|
||||
@@ -175,6 +181,7 @@ const refreshPage = async () => {
|
||||
bigBrother: res.bigBrother,
|
||||
crawl: res.crawl,
|
||||
webAi: res.webAi,
|
||||
autotk: res.autotk ?? res.autoTK,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user