导入 AKSRT 主题开发源码
This commit is contained in:
1 parent
9681dd3d48
commit
1268a55dd0
595 files changed
+127705
No files matched your search
@@ -0,0 +1,68 @@
|
||||
export const auditSchema = {
|
||||
key: 'extensions.audit',
|
||||
title: 'API内容审核',
|
||||
icon: 'fas fa-shield-virus',
|
||||
description: '配置第三方内容审核 API 接入、审核范围和失败回退策略。',
|
||||
defaults: {
|
||||
content_audit_enabled: false,
|
||||
content_audit_provider: 'baidu',
|
||||
content_audit_api_key: '',
|
||||
content_audit_api_secret: '',
|
||||
content_audit_text_enabled: true,
|
||||
content_audit_image_enabled: false,
|
||||
content_audit_on_failure: 'allow',
|
||||
content_audit_log_enabled: true,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'provider',
|
||||
title: '审核接口',
|
||||
icon: 'fas fa-plug',
|
||||
fields: [
|
||||
{ key: 'content_audit_enabled', label: '启用内容审核', type: 'switch', default: false, help: '开启后将对接第三方内容审核 API' },
|
||||
{
|
||||
key: 'content_audit_provider',
|
||||
label: '审核服务商',
|
||||
type: 'radio',
|
||||
default: 'baidu',
|
||||
options: [
|
||||
{ label: '百度内容审核', value: 'baidu' },
|
||||
{ label: '关闭审核接口', value: 'null' },
|
||||
],
|
||||
dependsOn: { key: 'content_audit_enabled', value: true },
|
||||
},
|
||||
{ key: 'content_audit_api_key', label: 'API Key', type: 'input', default: '', dependsOn: { key: 'content_audit_enabled', value: true }, help: '百度智能云 API Key' },
|
||||
{ key: 'content_audit_api_secret', label: 'Secret Key', type: 'input', default: '', dependsOn: { key: 'content_audit_enabled', value: true }, help: '百度智能云 Secret Key' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'scope',
|
||||
title: '审核范围',
|
||||
icon: 'fas fa-check-double',
|
||||
fields: [
|
||||
{ key: 'content_audit_text_enabled', label: '文本审核', type: 'switch', default: true, dependsOn: { key: 'content_audit_enabled', value: true } },
|
||||
{ key: 'content_audit_image_enabled', label: '图片审核', type: 'switch', default: false, dependsOn: { key: 'content_audit_enabled', value: true } },
|
||||
{ key: 'audit_bbs_term', label: '审核论坛分类', type: 'switch', default: false, dependsOn: { key: 'content_audit_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'fallback',
|
||||
title: '失败策略',
|
||||
icon: 'fas fa-exclamation-triangle',
|
||||
fields: [
|
||||
{
|
||||
key: 'content_audit_on_failure',
|
||||
label: '审核失败时',
|
||||
type: 'radio',
|
||||
default: 'allow',
|
||||
options: [
|
||||
{ label: '放行', value: 'allow' },
|
||||
{ label: '拦截', value: 'block' },
|
||||
],
|
||||
dependsOn: { key: 'content_audit_enabled', value: true },
|
||||
},
|
||||
{ key: 'content_audit_log_enabled', label: '记录审核日志', type: 'switch', default: true, dependsOn: { key: 'content_audit_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in new issue
Block a user