From 46e94966e556fc45ddee5295e9dc6f4e1f7c3f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 28 Sep 2026 11:38:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=B8=A0=E9=81=93=E5=9B=BE=E6=A0=87=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=9C=AA=E9=85=8D=E7=BD=AE=E6=97=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=8D=A0=E4=BD=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/driver/pay/PayChannelServices.php | 9 +++++---- frontend/admin/src/pages/driver/pay/index.vue | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/app/services/driver/pay/PayChannelServices.php b/backend/app/services/driver/pay/PayChannelServices.php index 2046b6227..b05c56914 100644 --- a/backend/app/services/driver/pay/PayChannelServices.php +++ b/backend/app/services/driver/pay/PayChannelServices.php @@ -70,9 +70,9 @@ class PayChannelServices extends BaseService $list = $this->dao->selectList($where, '*', 0, 0, 'sort desc,id asc')->toArray(); $drivers = $this->getDrivers(); - // 为每条记录附加驱动状态 + // 为每条记录附加驱动状态;管理端不做默认图标兜底,未配置即为空串,由前端显示占位符 foreach ($list as &$item) { - $item['icon'] = $this->getDisplayIcon($item['icon'] ?? ''); + $item['icon'] = $this->normalizeIcon($item['icon'] ?? ''); $item['driver_status'] = false; $item['driver_info'] = null; $driverName = $item['driver'] ?? ''; @@ -103,7 +103,7 @@ class PayChannelServices extends BaseService } $data = $channel->toArray(); - $data['icon'] = $this->getDisplayIcon($data['icon'] ?? ''); + $data['icon'] = $this->normalizeIcon($data['icon'] ?? ''); // 字段结构以已安装驱动的最新清单为准,数据库仅负责保存用户填写的 value。 // 这样插件升级 show_if、options、tip 等定义后无需手工迁移 pay_channel 旧 JSON。 @@ -421,7 +421,8 @@ class PayChannelServices extends BaseService } /** - * 获取展示图标。后台未配置图片时按 channel_key 使用对应的默认字体图标,不写回数据库。 + * 获取用户端展示图标。未配置图片时按 channel_key 使用对应的默认字体图标,不写回数据库。 + * 仅限用户端可用支付方式列表使用;管理端列表/详情不做兜底(normalizeIcon 后为空即返回空串)。 * * @param mixed $icon * @param string $channelKey 支付方式标识,用于匹配差异化默认图标 diff --git a/frontend/admin/src/pages/driver/pay/index.vue b/frontend/admin/src/pages/driver/pay/index.vue index 104b19c0e..0bd236dbd 100644 --- a/frontend/admin/src/pages/driver/pay/index.vue +++ b/frontend/admin/src/pages/driver/pay/index.vue @@ -17,6 +17,7 @@