mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Plugs.php
This commit is contained in:
parent
150e1f16bf
commit
ab4845c28c
@ -47,16 +47,14 @@ class Plugs extends Controller
|
|||||||
*/
|
*/
|
||||||
public function script(): \think\Response
|
public function script(): \think\Response
|
||||||
{
|
{
|
||||||
$debug = $this->app->isDebug() ? 'true' : 'false';
|
$taDebug = $this->app->isDebug() ? 'true' : 'false';
|
||||||
$editor = sysconf("base.editor") ?: "ckeditor4";
|
$taAdmin = sysuri('admin/index/index', [], false);
|
||||||
$taRoot = sysuri("admin/index/index", [], false);
|
$taEditor = sysconf('base.editor') ?: 'ckeditor4';
|
||||||
return response(join("\n", [
|
return response(join("\n", [
|
||||||
"window.taDebug = {$debug};",
|
"window.taDebug = {$taDebug};",
|
||||||
"window.taAdmin = '{$taRoot}';",
|
"window.taAdmin = '{$taAdmin}';",
|
||||||
"window.taEditor = '{$editor}';",
|
"window.taEditor = '{$taEditor}';",
|
||||||
]))->header([
|
]))->contentType('application/x-javascript');
|
||||||
'Content-Type' => 'application/x-javascript'
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user