diff --git a/core/core.php b/core/core.php index 644f36e..c9c1218 100644 --- a/core/core.php +++ b/core/core.php @@ -10,7 +10,7 @@ require_once('function.php'); require_once('parse.php'); /* 主题内置开放API */ -require_once('api.php'); +require_once('route.php'); /* 插件方法 */ require_once('factory.php'); @@ -37,7 +37,8 @@ function themeInit($self) /* 主题开放API 路由规则 */ $path_info = $self->request->getPathinfo(); - if ($path_info === "/joe/api") { + + if ($path_info == "/joe/api") { switch ($self->request->routeType) { case 'aside_ranking': _getRanking($self); diff --git a/core/api.php b/core/route.php similarity index 100% rename from core/api.php rename to core/route.php diff --git a/public/include.php b/public/include.php index 8110867..9700ae0 100644 --- a/public/include.php +++ b/public/include.php @@ -3,6 +3,7 @@ if (localStorage.getItem('data-night')) document.querySelector("html").setAttribute("data-night", "night") window.Joe = { LIVE2D: 'options->JLive2d() ?>', + // BASE_API: 'options->rewrite == 0 ? '/index.php/joe/api' : '/joe/api' ?>', BASE_API: '/index.php/joe/api', DYNAMIC_BACKGROUND: 'options->JDynamic_Background() ?>', WALLPAPER_BACKGROUND_PC: 'options->JWallpaper_Background_PC() ?>',