diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index f93229e..895d638 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -19,15 +19,16 @@ } // 生产 SPA base 为 /admin/(与 ChannelEntryController、Vite BASE_URL 一致) - $participantLoginUrl = url('/admin/c/'.rawurlencode($slug).'/login'); - $audienceLoginUrl = url('/admin/c/'.rawurlencode($slug).'/audience/login'); - $homeUrl = url('/'); + // 资源用根相对路径,避免 APP_URL 写成 https 后证书无效导致图片/样式全部加载失败。 + $participantLoginUrl = '/admin/c/'.rawurlencode($slug).'/login'; + $audienceLoginUrl = '/admin/c/'.rawurlencode($slug).'/audience/login'; + $homeUrl = '/'; $eventSitePath = public_path('frontend/event-site.html'); abort_unless(File::isFile($eventSitePath), 503, '赛事官网原型 frontend/event-site.html 不存在'); $html = File::get($eventSitePath); - $assetBase = rtrim(asset('frontend/assets'), '/'); + $assetBase = '/frontend/assets'; $html = str_replace( [