diff --git a/assets/admin/src/schema/sections/payment/vip.js b/assets/admin/src/schema/sections/payment/vip.js index b6d147fa..600161eb 100644 --- a/assets/admin/src/schema/sections/payment/vip.js +++ b/assets/admin/src/schema/sections/payment/vip.js @@ -4,6 +4,8 @@ export const vipSchema = { icon: 'fa fas fa-gem', description: '对齐 Zibll 双级会员:分档套餐、权益、续费/升级与积分兑换。', defaults: { + nav_pay_vip: true, + nav_user_pay_vip: true, pay_user_vip_1_s: true, pay_user_vip_1_name: '一级会员', pay_user_vip_1_desc: '尊享一级会员特权', @@ -44,6 +46,8 @@ export const vipSchema = { title: '会员等级', icon: 'fa fas fa-user', 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: 'pay_user_vip_1_name', label: '一级会员名称', type: 'input', default: '一级会员', dependsOn: { key: 'pay_user_vip_1_s', value: true } }, { key: 'pay_user_vip_1_desc', label: '一级会员一句话简介', type: 'input', default: '尊享一级会员特权', dependsOn: { key: 'pay_user_vip_1_s', value: true } }, diff --git a/inc/helpers/aksrt-header-menu-buttons.php b/inc/helpers/aksrt-header-menu-buttons.php index 4207adb1..64b90188 100644 --- a/inc/helpers/aksrt-header-menu-buttons.php +++ b/inc/helpers/aksrt-header-menu-buttons.php @@ -173,7 +173,7 @@ if (!function_exists('aksrt_render_header_menu_buttons')) : $show_vip = false; if (class_exists('\AKSRT\Settings\Settings')) { $vs = \AKSRT\Settings\Settings::get_payment_vip_settings(); - $show_vip = !empty($vs['enabled']); + $show_vip = !empty($vs['enabled']) && !empty($vs['nav_pay_vip']); } if ($show_vip) { $is_vip = false; diff --git a/inc/helpers/aksrt-header-userbox.php b/inc/helpers/aksrt-header-userbox.php index 71a030f9..5a004607 100644 --- a/inc/helpers/aksrt-header-userbox.php +++ b/inc/helpers/aksrt-header-userbox.php @@ -156,6 +156,9 @@ if (!function_exists('aksrt_header_payvip_bar')) : $html .= ''; return $html; } + if (empty($vip['nav_user_pay_vip'])) { + return ''; + } // Match check-in CTA geometry (full width, 6px radius) — not top-nav navbar-cta chips. return '