feat(admin): collapse provider/gateway groups by default, mask alipay private key, drop inline notice styles

- OAuth provider and payment gateway groups are collapsible and collapsed by default; remove dead expandWhen logic
- Textarea fields support secret masking; mark alipay_privatekey as secret in JS and PHP schemas
- Extract AksSecretClear shared by input and textarea secret fields
- Replace inline styles in payment/post-list notice HTML with aksrt-hint / aksrt-warn classes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-28 15:50:37 +08:00
1 parent 3179754670
commit fa89f43ac9
18 files changed
+129 -94

No files matched your search

+41 -29
View File
@@ -36,28 +36,21 @@
<template v-if="schema.prefix" #prefix>{{ schema.prefix }}</template>
<template v-if="schema.suffix" #suffix>{{ schema.suffix }}</template>
</n-input>
<n-button
v-if="schema.secret && (modelValue === '***' || secretMarkedForClear)"
size="small"
secondary
:type="secretMarkedForClear ? 'warning' : 'error'"
@click="toggleSecretClear"
>
{{ secretMarkedForClear ? '取消清除' : '清除已配置密钥' }}
</n-button>
<span v-if="secretMarkedForClear" class="aksrt-field__secret-clear-hint">保存后将删除此密钥</span>
<AksSecretClear :visible="secretClearVisible" :marked="secretMarkedForClear" @toggle="toggleSecretClear" />
</div>
<!-- Textarea -->
<n-input
v-else-if="schema.type === 'textarea'"
:value="modelValue"
type="textarea"
:placeholder="schema.placeholder || ''"
:rows="schema.rows || 4"
:disabled="schema.disabled"
@update:value="emit('update:modelValue', $event)"
/>
<!-- Textarea(secret 时不回显已配置值,聚焦后输入新值即覆盖) -->
<div v-else-if="schema.type === 'textarea'" class="aksrt-field__input-wrap">
<n-input
:value="secretTextareaValue"
type="textarea"
:placeholder="secretConfigured ? '已配置,留空保持不变;输入新值将覆盖' : (schema.placeholder || '')"
:rows="schema.rows || 4"
:disabled="schema.disabled"
@update:value="emit('update:modelValue', $event)"
/>
<AksSecretClear :visible="secretClearVisible" :marked="secretMarkedForClear" @toggle="toggleSecretClear" />
</div>
<!-- Number -->
<div v-else-if="schema.type === 'number' || schema.type === 'spinner'" class="aksrt-field__number">
@@ -534,6 +527,7 @@ import AksCodeEditor from './AksCodeEditor.vue'
import AksCompositeField from './AksCompositeField.vue'
import AksImageSelectField from './AksImageSelectField.vue'
import AksSortHandle from './AksSortHandle.vue'
import AksSecretClear from './AksSecretClear.vue'
import AksSelectedOrder from './AksSelectedOrder.vue'
import AksRepeaterListModal from './AksRepeaterListModal.vue'
import { buildFieldsetSections } from './fieldset-sections.js'
@@ -578,6 +572,10 @@ const fieldClasses = computed(() => ({
const secretMarkedForClear = computed(() => props.schema.secret && props.modelValue === '__AKSRT_CLEAR_SECRET__')
const secretDisplayValue = computed(() => secretMarkedForClear.value ? '' : props.modelValue)
/** 已配置密钥(服务端回传 '***'):textarea 不回显掩码,留空即保持原值。 */
const secretConfigured = computed(() => props.schema.secret && props.modelValue === '***')
const secretClearVisible = computed(() => secretConfigured.value || secretMarkedForClear.value)
const secretTextareaValue = computed(() => secretConfigured.value ? '' : secretDisplayValue.value)
function toggleSecretClear() {
emit('update:modelValue', secretMarkedForClear.value ? '***' : '__AKSRT_CLEAR_SECRET__')
@@ -776,15 +774,6 @@ function updateRepeaterItem(index, fieldKey, value) {
gap: 8px;
}
.aksrt-field__input-wrap .n-button {
justify-self: start;
}
.aksrt-field__secret-clear-hint {
color: var(--aksrt-color-warning, #d97706);
font-size: 12px;
}
.aksrt-field__label-row {
display: flex;
align-items: center;
@@ -948,12 +937,35 @@ function updateRepeaterItem(index, fieldKey, value) {
line-height: 1.6;
}
.aksrt-field__content :deep(p) {
margin: 0;
}
.aksrt-field__content :deep(p + ul) {
margin-top: 6px;
}
.aksrt-field__content :deep(ul) {
margin: 0;
padding-left: 18px;
line-height: 1.9;
}
/* 说明文字的小号灰色段落与警示文字(schema content 里用 class 引用) */
.aksrt-field__content :deep(.aksrt-hint) {
color: var(--aksrt-color-muted);
font-size: 12px;
line-height: 1.7;
}
.aksrt-field__content :deep(.aksrt-hint + .aksrt-hint) {
margin-top: 6px;
}
.aksrt-field__content :deep(.aksrt-warn) {
color: var(--aksrt-color-warning, #d97706);
}
/* Mobile */
@media (max-width: 768px) {
.aksrt-field__link,
@@ -47,8 +47,7 @@
* AksFieldGroup — card-style container for grouping related form fields.
* Supports collapsible sections, icon headers, and description text.
*
* defaultCollapsed only seeds initial state. Parent should remount the group
* (e.g. via :key when a channel turns on) if it wants to force expand again.
* defaultCollapsed only seeds the initial state; afterwards the user toggles freely.
*/
import { ref } from 'vue'
import FaIcon from './FaIcon.vue'
@@ -248,31 +248,13 @@ function isGroupVisible(group) {
return matchDependsOn(group.dependsOn)
}
/**
* expandWhen 与 dependsOn 同语法(表单 key 字符串或规则对象),规则成立时分组默认展开。
* 下拉值如 'null' 也是真值,所以按选项判断的分组要写规则对象,不能只写 key。
*/
function isGroupExpanded(group) {
return matchDependsOn(group.expandWhen)
}
/**
* Collapse preference for a group.
* - expandWhen: rule; when matched, start expanded (channel just enabled → open form)
* - defaultCollapsed: static default
*/
/** 可折叠分组的初始状态:defaultCollapsed 为真时默认收起。 */
function resolveGroupCollapsed(group) {
if (group.expandWhen) return !isGroupExpanded(group)
return !!group.defaultCollapsed
}
/** Stable key; remount when expandWhen flips so newly enabled channels open expanded. */
function groupKey(group) {
const base = group.key || group.title || 'group'
if (group.expandWhen) {
return `${base}:${isGroupExpanded(group) ? 'on' : 'off'}`
}
return base
return group.key || group.title || 'group'
}
/** Get field value from formData */
@@ -0,0 +1,36 @@
<template>
<div v-if="visible" class="aksrt-secret-clear">
<n-button size="small" secondary :type="marked ? 'warning' : 'error'" @click="$emit('toggle')">
{{ marked ? '取消清除' : '清除已配置密钥' }}
</n-button>
<span v-if="marked" class="aksrt-secret-clear__hint">保存后将删除此密钥</span>
</div>
</template>
<script setup>
/**
* 已配置密钥的「清除 / 取消清除」操作,input 与 textarea 两种 secret 字段共用。
*/
defineProps({
/** 当前存在已配置密钥('***')或已标记清除时显示 */
visible: { type: Boolean, default: false },
/** 是否已标记为保存时清除 */
marked: { type: Boolean, default: false },
})
defineEmits(['toggle'])
</script>
<style scoped>
.aksrt-secret-clear {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.aksrt-secret-clear__hint {
color: var(--aksrt-color-warning, #d97706);
font-size: 12px;
}
</style>
@@ -50,7 +50,7 @@ export const affiliateSchema = {
label: '',
type: 'content',
ui_only: true,
content: '<ul style="margin:0 0 0 18px;line-height:1.9"><li>识别模式「绑定注册」:用户只要是通过任意推广链接注册的,今后此用户消费均会给推荐人返佣</li><li>识别模式「仅推广链接」:只有通过推广链接购买的才会给推荐人返佣,不会考虑是否是推荐注册的</li><li>开启的订单类型如果一个都不勾选,则代表该用户类型不参与此功能</li><li>您可以根据网站的VIP设置相互配合设置相应的规则</li><li>下面的设置为全局设置,还可以单独为每一个用户设置规则和比例</li></ul>',
content: '<ul><li>识别模式「绑定注册」:用户只要是通过任意推广链接注册的,今后此用户消费均会给推荐人返佣</li><li>识别模式「仅推广链接」:只有通过推广链接购买的才会给推荐人返佣,不会考虑是否是推荐注册的</li><li>开启的订单类型如果一个都不勾选,则代表该用户类型不参与此功能</li><li>您可以根据网站的VIP设置相互配合设置相应的规则</li><li>下面的设置为全局设置,还可以单独为每一个用户设置规则和比例</li></ul>',
},
],
},
@@ -190,7 +190,7 @@ export const affiliateSchema = {
type: 'content',
ui_only: true,
dependsOn: { key: 'pay_rebate_s', value: true },
content: '<p><b>推广让利标签配置详解:</b></p><ul style="margin:6px 0 0 18px;line-height:1.9"><li>可使用的变量:折扣 <code>%discount%</code>、推荐人姓名 <code>%referrer_name%</code></li><li>使用变量示例:<code>%referrer_name%推荐购买 下单再减%discount%元</code></li></ul>',
content: '<p><b>推广让利标签配置详解:</b></p><ul><li>可使用的变量:折扣 <code>%discount%</code>、推荐人姓名 <code>%referrer_name%</code></li><li>使用变量示例:<code>%referrer_name%推荐购买 下单再减%discount%元</code></li></ul>',
},
{ key: 'pay_rebate_text_discount', label: '推广让利标签', type: 'input', default: '推荐购买 下单再减%discount%', dependsOn: { key: 'pay_rebate_s', value: true }, help: '显示在购买模块,推广让利的标签文案' },
],
@@ -198,6 +198,7 @@ export const gatewaySchema = {
icon: 'fa fas fa-credit-card',
description: '支付宝官方接口(当面付 / 网站应用)。',
collapsible: true,
defaultCollapsed: true,
dependsOn: { key: 'pay_alipay_sdk_options', value: 'official_alipay' },
fields: [
{
@@ -208,7 +209,7 @@ export const gatewaySchema = {
content: '<ul><li>支付宝公钥为必填项目(公钥错误可以成功付款,但会回调失败)</li><li>回调地址固定为 /wp-json/aksrt/v1/payment/alipay/{notify|return}</li><li>同时填写了企业支付以及当面付参数,则优先使用当面付</li></ul>',
},
{ key: 'alipay_appid', label: '当面付:APPID', type: 'input', default: '' },
{ key: 'alipay_privatekey', label: '当面付:应用私钥', type: 'textarea', sanitize_type: 'code', default: '', rows: 4 },
{ key: 'alipay_privatekey', label: '当面付:应用私钥', type: 'textarea', sanitize_type: 'code', default: '', rows: 4, secret: true },
{
key: 'alipay_payment_type',
label: '支付方式',
@@ -230,6 +231,7 @@ export const gatewaySchema = {
icon: 'fa fab fa-weixin',
description: '微信企业支付官方接口。',
collapsible: true,
defaultCollapsed: true,
dependsOn: { key: 'pay_wechat_sdk_options', value: 'official_wechat' },
fields: [
{
@@ -262,6 +264,7 @@ export const gatewaySchema = {
icon: 'fa fab fa-paypal',
description: '常见的海外支付接口。',
collapsible: true,
defaultCollapsed: true,
dependsOn: { key: 'pay_paypal_sdk_s', value: true },
fields: [
{
@@ -284,6 +287,7 @@ export const gatewaySchema = {
icon: 'fa fab fa-cc-stripe',
description: '常见的海外信用卡收款接口。',
collapsible: true,
defaultCollapsed: true,
dependsOn: { key: 'pay_stripe_sdk_s', value: true },
fields: [
{
@@ -307,6 +311,7 @@ export const gatewaySchema = {
icon: 'fa fas fa-university',
description: '易支付(彩虹协议)聚合收银台;通道由上方微信/支付宝接口选择控制。',
collapsible: true,
defaultCollapsed: true,
dependsOn: {
any: [
{ key: 'pay_wechat_sdk_options', value: 'epay' },
@@ -60,7 +60,7 @@ export const knowledgeSchema = {
label: '',
type: 'content',
ui_only: true,
content: '<p><b>知识付费</b></p><ul style="margin:6px 0 0 18px;line-height:1.9"><li>知识付费功能主要分为文章付费、付费会员、余额系统、推广返佣、创作分成等功能组成,您可以根据您的需要开启对应功能</li><li>使用支付功能请先在「收款接口」页配置好收款通道</li></ul>',
content: '<p><b>知识付费</b></p><ul><li>知识付费功能主要分为文章付费、付费会员、余额系统、推广返佣、创作分成等功能组成,您可以根据您的需要开启对应功能</li><li>使用支付功能请先在「收款接口」页配置好收款通道</li></ul>',
},
],
},
@@ -48,7 +48,7 @@ export const rechargeSchema = {
label: '',
type: 'content',
ui_only: true,
content: '<p><b>用户余额功能:</b></p><ul style="margin:6px 0 0 18px;line-height:1.9"><li>开启后用户可充值到余额,余额可用于全站消费</li><li>在下方设置默认的分成比例,同时支持单独为每一个用户设置独立的分成比例</li><li>可以在用户管理中,为某一个用户手动赠送余额</li></ul>',
content: '<p><b>用户余额功能:</b></p><ul><li>开启后用户可充值到余额,余额可用于全站消费</li><li>在下方设置默认的分成比例,同时支持单独为每一个用户设置独立的分成比例</li><li>可以在用户管理中,为某一个用户手动赠送余额</li></ul>',
},
],
},
@@ -31,7 +31,7 @@ export const revenueSchema = {
label: '',
type: 'content',
ui_only: true,
content: '<ul style="margin:0 0 0 18px;line-height:1.9"><li>开启创作分成后,用户发布的付费内容则按设置的比例收入与用户分成</li><li>在下方设置默认的分成比例,同时支持单独为每一个用户设置独立的分成比例</li><li>用户分成比例是按照订单实收现金并扣除推广佣金后,再按设置的比例分成</li><li>禁用此功能后,所有收款将不会与作者分成</li></ul>',
content: '<ul><li>开启创作分成后,用户发布的付费内容则按设置的比例收入与用户分成</li><li>在下方设置默认的分成比例,同时支持单独为每一个用户设置独立的分成比例</li><li>用户分成比例是按照订单实收现金并扣除推广佣金后,再按设置的比例分成</li><li>禁用此功能后,所有收款将不会与作者分成</li></ul>',
},
],
},
@@ -177,7 +177,7 @@ export const vipSchema = {
label: '',
type: 'content',
ui_only: true,
content: '<ul style="margin:0 0 0 18px;line-height:1.9"><li>开启付费会员功能之前,请先配置好收款接口,确保网站收款正常</li><li>会员功能的设置项目较多,请仔细核对,避免出现价格、时间的问题</li><li>配合设置名称、有效期等可搭配出不同类型的会员</li><li>管理员可在后台为用户单独开启会员</li></ul>',
content: '<ul><li>开启付费会员功能之前,请先配置好收款接口,确保网站收款正常</li><li>会员功能的设置项目较多,请仔细核对,避免出现价格、时间的问题</li><li>配合设置名称、有效期等可搭配出不同类型的会员</li><li>管理员可在后台为用户单独开启会员</li></ul>',
},
],
},
@@ -196,7 +196,7 @@ export const vipSchema = {
ui_only: true,
alertType: 'danger',
dependsOn: { all: [{ key: 'pay_user_vip_2_s', value: true }, { key: 'pay_user_vip_1_s', operator: 'falsy' }] },
content: '<div style="text-align:center"><b>必须先开启一级会员后才能开启二级会员!</b></div>',
content: '必须先开启一级会员后才能开启二级会员!',
},
{ key: 'pay_user_vip_2_s', label: '启用二级会员', type: 'switch', default: true },
],
@@ -33,7 +33,7 @@ export const commentSchema = {
type: 'content',
ui_only: true,
dependsOn: { key: 'close_comments', value: false },
content: '<p style="margin:0;font-size:12px;color:var(--aksrt-color-muted);line-height:1.6;"><i class="fa fas fa-fw fa-info-circle"></i> WordPress默认关闭评论翻页功能,如需启用请按此进行设置:<br/>1. 进入WP讨论设置,勾选 <code>分页显示评论</code><br/>2. 设置默认显示 <code>最前</code>一页<br/>3. 设置在每个页面顶部显示 <code>旧的</code>评论<br/>4. 根据需要设置每一页显示数量<br/>5. 根据需要设置评论嵌套(推荐开启并设置为3层)<br/>6. wp默认开启免登陆评论,如需关闭则勾选<code>需要登录后才能发表评论</code><br/><a href="options-discussion.php">【去设置】</a></p>',
content: '<p class="aksrt-hint"><i class="fa fas fa-fw fa-info-circle"></i> WordPress默认关闭评论翻页功能,如需启用请按此进行设置:<br/>1. 进入WP讨论设置,勾选 <code>分页显示评论</code><br/>2. 设置默认显示 <code>最前</code>一页<br/>3. 设置在每个页面顶部显示 <code>旧的</code>评论<br/>4. 根据需要设置每一页显示数量<br/>5. 根据需要设置评论嵌套(推荐开启并设置为3层)<br/>6. wp默认开启免登陆评论,如需关闭则勾选<code>需要登录后才能发表评论</code><br/><a href="options-discussion.php">【去设置】</a></p>',
},
{ key: 'close_comments', label: '关闭文章评论功能', type: 'switch', default: false, description: '部分网站无需交互,或需备案审核,可在此关闭所有文章的评论功能。同时每一篇文章可单独关闭评论功能' },
{
@@ -28,7 +28,7 @@ export const featureSchema = {
type: 'content',
ui_only: true,
dependsOn: { key: 'article_nav', value: true },
content: '<p style="margin:0 0 12px;font-size:12px;"><a href="https://www.zibll.com/1717.html" target="_blank">【查看官网教程】</a></p>',
content: '<p class="aksrt-hint"><a href="https://www.zibll.com/1717.html" target="_blank">【查看官网教程】</a></p>',
},
{ key: 'article_nav_mobile_nav_s', label: '在移动端弹出菜单内显示', type: 'switch', default: true, dependsOn: { key: 'article_nav', value: true }, description: '如需显示在侧边栏等其它位置,请使用小工具模块添加' },
{ key: 'imagelightbox', label: '图片灯箱', type: 'switch', default: true, description: '点击图片查看原图功能,共两种模式' },
@@ -38,7 +38,7 @@ export const featureSchema = {
type: 'content',
ui_only: true,
dependsOn: { key: 'imagelightbox', value: true },
content: '<p style="margin:0 0 12px;font-size:12px;"><a href="https://www.zibll.com/683.html" target="_blank">【查看官网教程】</a></p>',
content: '<p class="aksrt-hint"><a href="https://www.zibll.com/683.html" target="_blank">【查看官网教程】</a></p>',
},
{
key: 'imagelightbox_type',
@@ -18,7 +18,7 @@ export const filterSchema = {
key: 'filter_intro',
type: 'content',
ui_only: true,
content: '<p style="margin:0;font-size:12px;color:var(--aksrt-color-muted);line-height:1.7;"><b>文章高级筛选功能:</b>通过此功能可实现更加复杂、精细化的内容筛选<br/>添加筛选类型和内容值之后,编写文章时候,可以进行选择,且在前台也可以实现精准筛选<br/>例如影视网站:[类型]有[剧情/喜剧/悬疑/惊悚/犯罪],[地区]有[大陆/美国/日韩/港台/印度],[年份]有[2022/2021/2020/10年代/00年代]等<br/><span style="color:#d48806;">注意事项:添加类型key时候,只能使用英文加下划线,不能有空格,且尽量复杂一点(不能为tag,category等系统已存在的类型),避免与其他mate_key重复!类型名称不能为分类、标签等系统已存在的类型</span><br/><a href="https://www.zibll.com/15886.html" target="_blank">查看官网教程</a></p>',
content: '<p class="aksrt-hint"><b>文章高级筛选功能:</b>通过此功能可实现更加复杂、精细化的内容筛选<br/>添加筛选类型和内容值之后,编写文章时候,可以进行选择,且在前台也可以实现精准筛选<br/>例如影视网站:[类型]有[剧情/喜剧/悬疑/惊悚/犯罪],[地区]有[大陆/美国/日韩/港台/印度],[年份]有[2022/2021/2020/10年代/00年代]等<br/><span class="aksrt-warn">注意事项:添加类型key时候,只能使用英文加下划线,不能有空格,且尽量复杂一点(不能为tag,category等系统已存在的类型),避免与其他mate_key重复!类型名称不能为分类、标签等系统已存在的类型</span><br/><a href="https://www.zibll.com/15886.html" target="_blank">查看官网教程</a></p>',
},
{
key: 'custom_filter_show',
@@ -146,7 +146,7 @@ export const pageSchema = {
key: 'yiyan_intro',
type: 'content',
ui_only: true,
content: '<p style="margin:0;font-size:12px;color:var(--aksrt-color-muted);line-height:1.7;"><b>精彩一言功能:</b>随机显示中英文的文案,在此支持一言内容插入到文章页位置,同时可以使用小工具模块调用。<br/>主题默认调用的文件为:<code>themes/aksrt/yiyan/qv-yiyan.txt</code><br/>您可以将以上文件复制到 <code>wp-content</code> 文件夹,并重命名为 <code>yiyan.txt</code>,再进行修改或添加内容,则今后更新主题就无需二次修改</p>',
content: '<p class="aksrt-hint"><b>精彩一言功能:</b>随机显示中英文的文案,在此支持一言内容插入到文章页位置,同时可以使用小工具模块调用。<br/>主题默认调用的文件为:<code>themes/aksrt/yiyan/qv-yiyan.txt</code><br/>您可以将以上文件复制到 <code>wp-content</code> 文件夹,并重命名为 <code>yiyan.txt</code>,再进行修改或添加内容,则今后更新主题就无需二次修改</p>',
},
{ key: 'yiyan_single_content_header', label: '文章内容头部显示一言', type: 'switch', default: false },
{ key: 'yiyan_single_content_footer', label: '文章内容尾部显示一言', type: 'switch', default: false },
@@ -30,7 +30,7 @@ export const submitSchema = {
label: '',
type: 'content',
ui_only: true,
content: '<p style="margin:0;font-size:12px;color:var(--aksrt-color-muted);line-height:1.6;">此功能启用后,可以在<a href="admin.php?page=aksrt-settings#/permissions/capabilities">权限管理</a>中设置用户的发布、审核权限 <a href="admin.php?page=aksrt-settings#/permissions/capabilities">【去设置】</a></p>',
content: '<p class="aksrt-hint">此功能启用后,可以在<a href="admin.php?page=aksrt-settings#/permissions/capabilities">权限管理</a>中设置用户的发布、审核权限 <a href="admin.php?page=aksrt-settings#/permissions/capabilities">【去设置】</a></p>',
},
{ key: 'post_article_btn_txte', label: '按钮文字', type: 'input', default: '发布文章', dependsOn: { key: 'post_article_s', value: true }, description: '投稿按钮的显示的文字,推荐4个字更加协调' },
{ key: 'post_article_cat', label: '投稿允许选择的分类', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [], placeholder: '输入关键词以搜索分类', dependsOn: { key: 'post_article_s', value: true }, description: '投稿允许选择的分类,为空则允许选择全部分类,所选分类下如果有子分类则会自动显示,如果选择了上级分类,则不要再选该分类下的子分类。注意:请确保所选分类包含子分类总数不要超过50个,否则可能会引起页面崩溃' },
@@ -40,7 +40,7 @@ export const submitSchema = {
label: '',
type: 'content',
ui_only: true,
content: '<p style="margin:0;font-size:12px;color:var(--aksrt-color-muted);line-height:1.6;">此功能启用后,请先在<a href="admin.php?page=aksrt-settings#/post-list/filter">文章列表/高级筛选</a>中添加高级筛选明细 <a href="admin.php?page=aksrt-settings#/post-list/filter">【去设置】</a></p>',
content: '<p class="aksrt-hint">此功能启用后,请先在<a href="admin.php?page=aksrt-settings#/post-list/filter">文章列表/高级筛选</a>中添加高级筛选明细 <a href="admin.php?page=aksrt-settings#/post-list/filter">【去设置】</a></p>',
},
{ key: 'post_article_tag', label: '允许插入标签', type: 'switch', default: true, dependsOn: { key: 'post_article_s', value: true }, description: '前台投稿时候允许设置文章标签' },
{ key: 'post_article_user', label: '免登陆投稿发布用户', type: 'user_select', default: 1, dependsOn: { key: 'post_article_s', value: true }, description: '当选择投稿权限为无需登录就能投稿时,投稿文章的用户' },
@@ -84,7 +84,7 @@ export const oauthSchema = {
title: 'GitHub配置',
icon: 'fa fab fa-github',
collapsible: true,
expandWhen: 'oauth_github_s',
defaultCollapsed: true,
fields: [
{ key: 'github_appid', label: 'Client ID', type: 'input', default: '' },
{ key: 'github_appkey', label: 'Client Secret', type: 'input', inputType: 'password', secret: true, default: '' },
@@ -95,7 +95,7 @@ export const oauthSchema = {
title: 'Gitee配置',
icon: 'fa fas fa-code-branch',
collapsible: true,
expandWhen: 'oauth_gitee_s',
defaultCollapsed: true,
fields: [
{ key: 'gitee_appid', label: 'Client ID', type: 'input', default: '' },
{ key: 'gitee_appkey', label: 'Client Secret', type: 'input', inputType: 'password', secret: true, default: '' },
@@ -106,7 +106,7 @@ export const oauthSchema = {
title: 'QQ配置',
icon: 'fa fab fa-qq',
collapsible: true,
expandWhen: 'oauth_qq_s',
defaultCollapsed: true,
fields: [
{ key: 'qq_appid', label: 'App ID', type: 'input', default: '' },
{ key: 'qq_appkey', label: 'App Key', type: 'input', inputType: 'password', secret: true, default: '' },
@@ -117,7 +117,7 @@ export const oauthSchema = {
title: 'Google配置',
icon: 'fa fab fa-google',
collapsible: true,
expandWhen: 'oauth_google_s',
defaultCollapsed: true,
fields: [
{ key: 'google_client_id', label: 'Client ID', type: 'input', default: '' },
{ key: 'google_client_secret', label: 'Client Secret', type: 'input', inputType: 'password', secret: true, default: '' },
@@ -128,7 +128,7 @@ export const oauthSchema = {
title: '微博配置',
icon: 'fa fab fa-weibo',
collapsible: true,
expandWhen: 'oauth_weibo_s',
defaultCollapsed: true,
fields: [
{ key: 'weibo_appid', label: 'App Key', type: 'input', default: '' },
{ key: 'weibo_appkey', label: 'App Secret', type: 'input', inputType: 'password', secret: true, default: '' },
@@ -139,7 +139,7 @@ export const oauthSchema = {
title: '微信开放平台配置',
icon: 'fa fab fa-weixin',
collapsible: true,
expandWhen: 'oauth_weixin_s',
defaultCollapsed: true,
fields: [
{ key: 'weixin_appid', label: 'AppID', type: 'input', default: '' },
{ key: 'weixin_appsecret', label: 'AppSecret', type: 'input', inputType: 'password', secret: true, default: '' },
@@ -150,7 +150,7 @@ export const oauthSchema = {
title: '微信公众号配置',
icon: 'fa fab fa-weixin',
collapsible: true,
expandWhen: 'oauth_weixingzh_s',
defaultCollapsed: true,
fields: [
{ key: 'weixingzh_gzh_type', label: '公众号类型', type: 'radio', default: 'service', options: [{ label: '服务号', value: 'service' }, { label: '订阅号', value: 'subscribe' }] },
{ key: 'weixingzh_token', label: 'Token', type: 'input', inputType: 'password', secret: true, default: '' },
@@ -168,6 +168,7 @@ export const oauthSchema = {
title: '彩虹聚合登录',
icon: 'fa fas fa-cloud',
collapsible: true,
defaultCollapsed: true,
dependsOn: { key: 'clogin_s', value: true },
fields: [
{ key: 'clogin_url', label: '接口地址', type: 'input', default: '', help: '如 https://xxx.com,不要带 connect.php' },