From 863bac409cbfa380a8242ea36072b7866d08a7ee Mon Sep 17 00:00:00 2001 From: Swling Date: Wed, 3 Jul 2024 21:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=8C=BF=E5=90=8D=E5=85=85?= =?UTF-8?q?=E5=80=BC=E7=94=A8=E6=88=B7=EF=BC=9A=E6=96=B0=E5=85=85=E5=80=BC?= =?UTF-8?q?=E5=B0=86=E8=A6=86=E7=9B=96=E5=BD=93=E5=89=8D=E4=BD=99=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/module/common/wnd-user-recharge-form.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/module/common/wnd-user-recharge-form.php b/includes/module/common/wnd-user-recharge-form.php index 345b8bad..5fa8d99e 100644 --- a/includes/module/common/wnd-user-recharge-form.php +++ b/includes/module/common/wnd-user-recharge-form.php @@ -16,7 +16,12 @@ class Wnd_User_Recharge_Form extends Wnd_Module_Form { protected static function configure_form(array $args = []): object { $form = new Wnd_Form_WP(); if (!is_user_logged_in()) { - $form->set_message(__('匿名充值24小时内有效,无法累加,请即充即用!', 'wnd'), 'is-danger'); + $balance = wnd_get_anon_user_balance(); + if ($balance) { + $form->set_message(__('注意:新充值将覆盖当前余额:', 'wnd') . '' . number_format($balance, 2) . '', 'is-danger'); + } else { + $form->set_message(__('匿名充值24小时内有效,请即充即用!', 'wnd'), 'is-danger'); + } } $form->add_html('
'); $form->add_radio(