Ver código fonte

【修复】修正包列表加载的 URL

- 在 loadPackages 函数中,将 fetch("index.json") 修改为 fetch("/index.json")
- 这个改动确保了正确请求根目录下的 index.json 文件,避免了可能的路径错误导致的加载失败
PJ568 1 ano atrás
pai
commit
d3c989cd63
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      404.html

+ 1 - 1
404.html

@@ -123,7 +123,7 @@
         // 加载已安装的应用包列表
         // 加载已安装的应用包列表
         async function loadPackages() {
         async function loadPackages() {
           try {
           try {
-            const response = await fetch("index.json");
+            const response = await fetch("/index.json");
             const data = await response.json();
             const data = await response.json();
             return data.packages || [];
             return data.packages || [];
           } catch (error) {
           } catch (error) {