select()->toArray(); foreach ($rows as $r) { $type = strtolower(trim((string) ($r['type'] ?? ''))); if ($type !== 'certificate' && $type !== 'guide') { continue; } $map[$type] = trim((string) ($r['image_url'] ?? '')); } } catch (Throwable) { // 若未执行补丁 SQL,回退到内置静态图,避免影响用户下载流程。 } return json([ 'code' => 0, 'msg' => 'ok', 'data' => [ 'certificate' => $map['certificate'] ?? '/static/certificate-dialog-bg.png', 'guide' => $map['guide'] ?? '/static/daocheng-yading-map.png', ], ]); } }