From 2e9d42b9c5798b1ab71d1fd59364a84e4c49be70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com> Date: Wed, 3 Feb 2021 17:58:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 5 +++-- core/{api.php => route.php} | 0 public/include.php | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) rename core/{api.php => route.php} (100%) 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() ?>',