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
+123 -88

No files matched your search

+35 -23
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 -->
<!-- Textarea(secret 时不回显已配置值,聚焦后输入新值即覆盖) -->
<div v-else-if="schema.type === 'textarea'" class="aksrt-field__input-wrap">
<n-input
v-else-if="schema.type === 'textarea'"
:value="modelValue"
:value="secretTextareaValue"
type="textarea"
:placeholder="schema.placeholder || ''"
: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' },
+13 -13
View File
@@ -33,7 +33,7 @@ class SchemaPayment {
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'notice', 'title' => '说明', 'fields' => [
['key' => 'knowledge_notice', '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>'],
['key' => 'knowledge_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<p><b>知识付费</b></p><ul><li>知识付费功能主要分为文章付费、付费会员、余额系统、推广返佣、创作分成等功能组成,您可以根据您的需要开启对应功能</li><li>使用支付功能请先在「收款接口」页配置好收款通道</li></ul>'],
]],
['key' => 'guest-buy', 'title' => '免登陆购买', 'fields' => [
['key' => 'pay_no_logged_in', 'label' => '免登陆购买', 'type' => 'switch', 'default' => true, 'help' => '开启后如果用户未登录则使用浏览器缓存验证是否购买'],
@@ -125,7 +125,7 @@ class SchemaPayment {
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'notice', 'title' => '说明', 'fields' => [
['key' => 'recharge_notice', '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>'],
['key' => 'recharge_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<p><b>用户余额功能:</b></p><ul><li>开启后用户可充值到余额,余额可用于全站消费</li><li>在下方设置默认的分成比例,同时支持单独为每一个用户设置独立的分成比例</li><li>可以在用户管理中,为某一个用户手动赠送余额</li></ul>'],
]],
['key' => 'basic', 'title' => '用户余额', 'fields' => [
['key' => 'pay_balance_s', 'label' => '启用余额充值/支付功能', 'type' => 'switch', 'default' => true, 'help' => '开启后用户中心显示现金钱包,并可作为收银台支付方式'],
@@ -182,13 +182,13 @@ class SchemaPayment {
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'notice', 'title' => '说明', 'fields' => [
['key' => 'vip_notice', '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>'],
['key' => 'vip_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<ul><li>开启付费会员功能之前,请先配置好收款接口,确保网站收款正常</li><li>会员功能的设置项目较多,请仔细核对,避免出现价格、时间的问题</li><li>配合设置名称、有效期等可搭配出不同类型的会员</li><li>管理员可在后台为用户单独开启会员</li></ul>'],
]],
['key' => 'basic', 'title' => '会员等级', 'fields' => [
['key' => 'nav_pay_vip', 'label' => '导航栏购买按钮', 'type' => 'switch', 'default' => true, 'help' => '在顶部导航栏显示开通会员按钮;请注意顶部导航的整体宽度。'],
['key' => 'nav_user_pay_vip', 'label' => '用户框购买按钮', 'type' => 'switch', 'default' => true, 'help' => '在导航栏用户框内显示开通会员按钮。'],
['key' => 'pay_user_vip_1_s', 'label' => '启用一级会员', 'type' => 'switch', 'default' => true],
['key' => 'vip_level_order_notice', 'label' => '', 'type' => 'notice', '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>'],
['key' => 'vip_level_order_notice', 'label' => '', 'type' => 'notice', 'ui_only' => true, 'alertType' => 'danger', 'dependsOn' => ['all' => [['key' => 'pay_user_vip_2_s', 'value' => true], ['key' => 'pay_user_vip_1_s', 'operator' => 'falsy']]], 'content' => '必须先开启一级会员后才能开启二级会员!'],
['key' => 'pay_user_vip_2_s', 'label' => '启用二级会员', 'type' => 'switch', 'default' => true],
]],
['key' => 'benefit', 'title' => '会员权益', 'fields' => [
@@ -325,7 +325,7 @@ class SchemaPayment {
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'notice', 'title' => '说明', 'fields' => [
['key' => 'revenue_notice', '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>'],
['key' => 'revenue_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<ul><li>开启创作分成后,用户发布的付费内容则按设置的比例收入与用户分成</li><li>在下方设置默认的分成比例,同时支持单独为每一个用户设置独立的分成比例</li><li>用户分成比例是按照订单实收现金并扣除推广佣金后,再按设置的比例分成</li><li>禁用此功能后,所有收款将不会与作者分成</li></ul>'],
]],
['key' => 'basic', 'title' => '创作中心设置', 'fields' => [
['key' => 'pay_income_s', 'label' => '启用创作分成', 'type' => 'switch', 'default' => false],
@@ -360,7 +360,7 @@ class SchemaPayment {
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'notice', 'title' => '说明', 'fields' => [
['key' => 'affiliate_notice', '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>'],
['key' => 'affiliate_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<ul><li>识别模式「绑定注册」:用户只要是通过任意推广链接注册的,今后此用户消费均会给推荐人返佣</li><li>识别模式「仅推广链接」:只有通过推广链接购买的才会给推荐人返佣,不会考虑是否是推荐注册的</li><li>开启的订单类型如果一个都不勾选,则代表该用户类型不参与此功能</li><li>您可以根据网站的VIP设置相互配合设置相应的规则</li><li>下面的设置为全局设置,还可以单独为每一个用户设置规则和比例</li></ul>'],
]],
['key' => 'switch', 'title' => '推广返佣', 'fields' => [
['key' => 'pay_rebate_s', 'label' => '启用推广返佣', 'type' => 'switch', 'default' => false],
@@ -423,7 +423,7 @@ class SchemaPayment {
['key' => 'pay_rebate_poster_desc_bottom', 'label' => '海报底部文案', 'type' => 'input', 'default' => '扫描二维码阅读全文', 'dependsOn' => ['key' => 'pay_rebate_poster_s', 'value' => true], 'help' => '画在二维码下方居中位置,留空则使用默认文案。'],
]],
['key' => 'discount', 'title' => '推广让利标签', 'fields' => [
['key' => 'discount_notice', 'label' => '', 'type' => 'content', 'ui_only' => 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>', 'dependsOn' => ['key' => 'pay_rebate_s', 'value' => true]],
['key' => 'discount_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<p><b>推广让利标签配置详解:</b></p><ul><li>可使用的变量:折扣 <code>%discount%</code>、推荐人姓名 <code>%referrer_name%</code></li><li>使用变量示例:<code>%referrer_name%推荐购买 下单再减%discount%元</code></li></ul>', 'dependsOn' => ['key' => 'pay_rebate_s', 'value' => true]],
['key' => 'pay_rebate_text_discount', 'label' => '推广让利标签', 'type' => 'input', 'default' => '推荐购买 下单再减%discount%', 'dependsOn' => ['key' => 'pay_rebate_s', 'value' => true], 'help' => '显示在购买模块,推广让利的标签文案'],
]],
],
@@ -485,10 +485,10 @@ class SchemaPayment {
['key' => 'card_pass', 'label' => '卡密'],
], 'help' => '收银台支付方式显示顺序;仅显示已开启的接口'],
]],
['key' => 'alipay', 'title' => '支付宝官方', 'collapsible' => true, 'dependsOn' => ['key' => 'pay_alipay_sdk_options', 'value' => 'official_alipay'], 'fields' => [
['key' => 'alipay', 'title' => '支付宝官方', 'collapsible' => true, 'defaultCollapsed' => true, 'dependsOn' => ['key' => 'pay_alipay_sdk_options', 'value' => 'official_alipay'], 'fields' => [
['key' => 'alipay_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, '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' => '支付方式', 'type' => 'select', 'default' => 'page', 'options' => [
['label' => '电脑网站支付(web)', 'value' => 'page'],
['label' => '手机网站支付(wap)', 'value' => 'wap'],
@@ -497,7 +497,7 @@ class SchemaPayment {
['key' => 'alipay_public_cert_path', 'label' => '支付宝公钥证书路径', 'type' => 'input', 'default' => '', 'help' => 'alipayCertPublicKey_RSA2.crt 绝对路径。'],
['key' => 'alipay_root_cert_path', 'label' => '支付宝根证书路径', 'type' => 'input', 'default' => '', 'help' => 'alipayRootCert.crt 绝对路径。'],
]],
['key' => 'wechat', 'title' => '微信官方', 'collapsible' => true, 'dependsOn' => ['key' => 'pay_wechat_sdk_options', 'value' => 'official_wechat'], 'fields' => [
['key' => 'wechat', 'title' => '微信官方', 'collapsible' => true, 'defaultCollapsed' => true, 'dependsOn' => ['key' => 'pay_wechat_sdk_options', 'value' => 'official_wechat'], 'fields' => [
['key' => 'wechat_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<ul><li>微信企业支付:官方接口,商家可申请,有年费,申请较为复杂</li><li>回调地址固定为 /wp-json/aksrt/v1/payment/wechatpay/{notify|return},请配置 Native 支付回调链接</li></ul>'],
['key' => 'wechat_merchantid', 'label' => '商户号 PartnerID', 'type' => 'input', 'default' => ''],
['key' => 'wechat_appid', 'label' => '授权绑定的AppID', 'type' => 'input', 'default' => ''],
@@ -509,7 +509,7 @@ class SchemaPayment {
['key' => 'wechat_private_key_path', 'label' => '商户私钥路径', 'type' => 'input', 'default' => '', 'help' => 'apiclient_key.pem 绝对路径,用于签名。'],
['key' => 'wechat_cert_path', 'label' => '商户API证书路径', 'type' => 'input', 'default' => '', 'help' => 'apiclient_cert.pem 绝对路径。'],
]],
['key' => 'paypal', 'title' => 'PayPal(贝宝)', 'collapsible' => true, 'dependsOn' => ['key' => 'pay_paypal_sdk_s', 'value' => true], 'fields' => [
['key' => 'paypal', 'title' => 'PayPal(贝宝)', 'collapsible' => true, 'defaultCollapsed' => true, 'dependsOn' => ['key' => 'pay_paypal_sdk_s', 'value' => true], 'fields' => [
['key' => 'paypal_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<ul><li>PayPal(贝宝)是常见的海外支付接口</li><li>如果您的收款账户为中国大陆地区,则账户类型必须是企业,且只能收取非中国大陆区的PayPal付款</li><li>REST 应用申请:https://developer.paypal.com/dashboard/applications</li></ul>'],
['key' => 'paypal_client_id', 'label' => 'Client ID', 'type' => 'input', 'default' => ''],
['key' => 'paypal_client_secret', 'label' => 'Client Secret', 'type' => 'input', 'inputType' => 'password', 'secret' => true, 'default' => ''],
@@ -517,7 +517,7 @@ class SchemaPayment {
['key' => 'paypal_rates', 'label' => '货币汇率', 'type' => 'input', 'default' => '0.14', 'help' => '根据你选择的货币类型与您定价货币的汇率进行填写,例如1元人民币兑换0.137美元(USD),则此处填0.137'],
['key' => 'paypal_sandbox', 'label' => '沙盒调试模式', 'type' => 'switch', 'default' => false, 'help' => '沙箱模式(Sandbox)是PayPal支付的测试环境。开启后请使用沙箱环境生成的收款账户和付款账户进行测试。'],
]],
['key' => 'stripe', 'title' => 'Stripe', 'collapsible' => true, 'dependsOn' => ['key' => 'pay_stripe_sdk_s', 'value' => true], 'fields' => [
['key' => 'stripe', 'title' => 'Stripe', 'collapsible' => true, 'defaultCollapsed' => true, 'dependsOn' => ['key' => 'pay_stripe_sdk_s', 'value' => true], 'fields' => [
['key' => 'stripe_notice', 'label' => '', 'type' => 'content', 'ui_only' => true, 'content' => '<ul><li>Stripe 是常见的海外信用卡收款接口</li><li>API 密钥申请:https://dashboard.stripe.com/apikeys</li><li>Webhook 事件:checkout.session.completed</li><li>测试环境请使用 sk_test_ 开头的 Secret Key</li></ul>'],
['key' => 'stripe_secret_key', 'label' => '私钥Secret Key', 'type' => 'input', 'inputType' => 'password', 'secret' => true, 'default' => '', 'help' => 'Stripe Dashboard → Developers → API keys → Secret key'],
['key' => 'stripe_publishable_key', 'label' => 'Publishable Key', 'type' => 'input', 'default' => ''],
@@ -526,7 +526,7 @@ class SchemaPayment {
['key' => 'stripe_rates', 'label' => '货币汇率', 'type' => 'input', 'default' => '0.14', 'help' => '根据你选择的货币类型与您定价货币的汇率进行填写,例如1元人民币兑换0.137美元(USD),则此处填0.137'],
['key' => 'stripe_test_mode', 'label' => '测试模式', 'type' => 'switch', 'default' => false, 'help' => '如果使用的测试开放模式,则请使用 sk_test_ 测试密钥与 Stripe 测试卡进行配置'],
]],
['key' => 'epay', 'title' => '易支付', 'collapsible' => true, 'dependsOn' => ['any' => [
['key' => 'epay', 'title' => '易支付', 'collapsible' => true, 'defaultCollapsed' => true, 'dependsOn' => ['any' => [
['key' => 'pay_wechat_sdk_options', 'value' => 'epay'],
['key' => 'pay_alipay_sdk_options', 'value' => 'epay'],
]], 'fields' => [
+8 -8
View File
@@ -336,31 +336,31 @@ class SchemaUsers {
['key' => 'oauth_weixingzh_s', 'label' => '微信公众号登录', 'type' => 'switch', 'default' => false],
['key' => 'clogin_s', 'label' => '彩虹聚合登录', 'type' => 'switch', 'default' => false, 'help' => '通过第三方聚合登录平台统一接入 QQ、微信和微博'],
]],
['key' => 'github', 'title' => 'GitHub配置', 'collapsible' => true, 'expandWhen' => 'oauth_github_s', 'fields' => [
['key' => 'github', 'title' => 'GitHub配置', 'collapsible' => true, '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' => ''],
]],
['key' => 'gitee', 'title' => 'Gitee配置', 'collapsible' => true, 'expandWhen' => 'oauth_gitee_s', 'fields' => [
['key' => 'gitee', 'title' => 'Gitee配置', 'collapsible' => true, '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' => ''],
]],
['key' => 'qq', 'title' => 'QQ配置', 'collapsible' => true, 'expandWhen' => 'oauth_qq_s', 'fields' => [
['key' => 'qq', 'title' => 'QQ配置', 'collapsible' => true, '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' => ''],
]],
['key' => 'google', 'title' => 'Google配置', 'collapsible' => true, 'expandWhen' => 'oauth_google_s', 'fields' => [
['key' => 'google', 'title' => 'Google配置', 'collapsible' => true, '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' => ''],
]],
['key' => 'weibo', 'title' => '微博配置', 'collapsible' => true, 'expandWhen' => 'oauth_weibo_s', 'fields' => [
['key' => 'weibo', 'title' => '微博配置', 'collapsible' => true, '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' => ''],
]],
['key' => 'weixin', 'title' => '微信开放平台配置', 'collapsible' => true, 'expandWhen' => 'oauth_weixin_s', 'fields' => [
['key' => 'weixin', 'title' => '微信开放平台配置', 'collapsible' => true, 'defaultCollapsed' => true, 'fields' => [
['key' => 'weixin_appid', 'label' => 'AppID', 'type' => 'input', 'default' => ''],
['key' => 'weixin_appsecret', 'label' => 'AppSecret', 'type' => 'input', 'inputType' => 'password', 'secret' => true, 'default' => ''],
]],
['key' => 'weixingzh', 'title' => '微信公众号配置', 'collapsible' => true, 'expandWhen' => 'oauth_weixingzh_s', 'fields' => [
['key' => 'weixingzh', 'title' => '微信公众号配置', 'collapsible' => true, 'defaultCollapsed' => true, 'fields' => [
['key' => 'weixingzh_gzh_type', 'label' => '公众号类型', 'type' => 'radio', 'default' => 'service', 'options' => [
['label' => '服务号', 'value' => 'service'],
['label' => '订阅号', 'value' => 'subscribe'],
@@ -374,7 +374,7 @@ class SchemaUsers {
['key' => 'weixingzh_subscribe_msg', 'label' => '关注后回复', 'type' => 'textarea', 'default' => '', 'help' => '用户关注公众号后的自动回复文案'],
['key' => 'weixingzh_scan_msg', 'label' => '扫码回复', 'type' => 'textarea', 'default' => '', 'help' => '用户扫码关注公众号后的回复文案'],
]],
['key' => 'clogin', 'title' => '彩虹聚合登录', 'collapsible' => true, 'dependsOn' => ['key' => 'clogin_s', 'value' => true], 'fields' => [
['key' => 'clogin', 'title' => '彩虹聚合登录', 'collapsible' => true, 'defaultCollapsed' => true, 'dependsOn' => ['key' => 'clogin_s', 'value' => true], 'fields' => [
['key' => 'clogin_url', 'label' => '接口地址', 'type' => 'input', 'sanitize_type' => 'url', 'default' => '', 'help' => '如 https://xxx.com,不要带 connect.php'],
['key' => 'clogin_id', 'label' => 'AppID', 'type' => 'input', 'default' => ''],
['key' => 'clogin_key', 'label' => 'AppKey', 'type' => 'input', 'inputType' => 'password', 'secret' => true, 'default' => ''],