新增tk版 自动私信

This commit is contained in:
2026-04-17 16:32:07 +08:00
parent c0125a5a9f
commit 5bdf5722a1
6 changed files with 275 additions and 474 deletions

View File

@@ -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,
});
}
}