From 9422674a2b5f22cbd19583cf99493a802d990d6a Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 11 Jul 2022 14:02:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/api/Plugs.php | 4 ++-- public/static/admin.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/admin/controller/api/Plugs.php b/app/admin/controller/api/Plugs.php index 0f68e931f..5a2c8f44c 100644 --- a/app/admin/controller/api/Plugs.php +++ b/app/admin/controller/api/Plugs.php @@ -49,11 +49,11 @@ class Plugs extends Controller { $debug = $this->app->isDebug() ? 'true' : 'false'; $editor = sysconf("base.editor") ?: "ckeditor4"; - $taroot = sysuri("admin/index/index", [], false); + $taRoot = sysuri("admin/index/index", [], false); return response(join("\n", [ "window.taDebug = {$debug};", + "window.taAdmin = '{$taRoot}';", "window.taEditor = '{$editor}';", - "window.tapiRoot = '{$taroot}';", ]))->header([ 'Content-Type' => 'application/x-javascript' ]); diff --git a/public/static/admin.js b/public/static/admin.js index 6a60d10e7..74a9ff75c 100644 --- a/public/static/admin.js +++ b/public/static/admin.js @@ -40,7 +40,7 @@ if (typeof Array.prototype.forEach !== 'function') { var srcs = document.scripts[document.scripts.length - 1].src.split('/'); window.appRoot = srcs.slice(0, -2).join('/') + '/'; window.baseRoot = srcs.slice(0, -1).join('/') + '/'; -window.tapiRoot = window.tapiRoot || window.appRoot + "admin"; +window.tapiRoot = window.taAdmin || window.appRoot + "admin"; /*! 挂载 layui & jquery 对象 */ layui.config({base: baseRoot + 'plugs/layui_exts/'});