fix(vip): scope redesign to summary card
Restore the existing membership purchase cards and keep the UX refresh limited to the top membership summary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b60894a371
commit
21c3300255
2 files changed
+11
-202
No files matched your search
@@ -95,9 +95,8 @@ foreach ([1, 2] as $lv) {
|
||||
$equity = function_exists('aksrt_format_vip_equity_html')
|
||||
? aksrt_format_vip_equity_html($equity_raw)
|
||||
: '';
|
||||
$cta = sprintf(__('开通%s', 'aksrt'), $lv_name);
|
||||
$vip_attr = $lv;
|
||||
$cta_is_current = false;
|
||||
$cta = sprintf(__('开通%s', 'aksrt'), $lv_name);
|
||||
$vip_attr = $lv;
|
||||
if (str_starts_with($btn_type, 'renew_')) {
|
||||
$renew_lv = (int) substr($btn_type, 6);
|
||||
if ($lv === $renew_lv) {
|
||||
@@ -116,12 +115,7 @@ foreach ([1, 2] as $lv) {
|
||||
} elseif ($level > 0 && $lv < $level) {
|
||||
continue;
|
||||
} elseif ($level > 0 && $lv === $level) {
|
||||
if ($vip_is_permanent) {
|
||||
$cta = __('当前等级', 'aksrt');
|
||||
$cta_is_current = true;
|
||||
} else {
|
||||
$cta = sprintf(__('续费%s', 'aksrt'), $lv_name);
|
||||
}
|
||||
$cta = sprintf(__('续费%s', 'aksrt'), $lv_name);
|
||||
}
|
||||
|
||||
$cards .= '<div class="zib-widget text-center pay-vip-info flex1 level-' . $lv . ' uc-vip-level-card">';
|
||||
@@ -136,14 +130,9 @@ foreach ([1, 2] as $lv) {
|
||||
}
|
||||
$cards .= '</div></div>';
|
||||
$cards .= $equity;
|
||||
if ($cta_is_current) {
|
||||
$cards .= '<span class="padding-lg but jb-vip' . $lv . ' radius uc-vip-cta uc-vip-cta--current" aria-current="true">'
|
||||
. '<span>' . esc_html($cta) . '</span></span>';
|
||||
} else {
|
||||
$cards .= '<a class="padding-lg but jb-vip' . $lv . ' radius pay-vip uc-vip-cta" href="javascript:;" vip-level="' . (int) $vip_attr . '" data-vip-level="' . (int) $vip_attr . '">'
|
||||
. '<span>' . esc_html($cta) . '</span>'
|
||||
. ' <i class="fas fa-chevron-circle-right" aria-hidden="true"></i></a>';
|
||||
}
|
||||
$cards .= '<a class="padding-lg but jb-vip' . $lv . ' radius pay-vip uc-vip-cta" href="javascript:;" vip-level="' . (int) $vip_attr . '">'
|
||||
. '<span>' . esc_html($cta) . '</span>'
|
||||
. ' <i class="fas fa-chevron-circle-right" aria-hidden="true"></i></a>';
|
||||
$cards .= '</div></div>';
|
||||
}
|
||||
|
||||
@@ -152,7 +141,7 @@ $points_html = '';
|
||||
if ($level <= 0 && !empty($vip_settings['points_exchange']['enabled'])) {
|
||||
$points_html = '<div class="c-yellow zib-widget flex ac jsb uc-vip-points-link mt10">'
|
||||
. '<div class="flex1 em12 flex ac"><i class="fas fa-coins" aria-hidden="true"></i><span class="ml6">' . esc_html__('积分兑换会员', 'aksrt') . '</span></div>'
|
||||
. '<a class="badg radius c-yellow pay-vip" href="javascript:;" vip-level="1" data-vip-level="1">'
|
||||
. '<a class="badg radius c-yellow pay-vip" href="javascript:;" vip-level="1">'
|
||||
. esc_html__('立即兑换', 'aksrt')
|
||||
. ' <i class="fas fa-chevron-circle-right" aria-hidden="true"></i></a></div>';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user