mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改插件模板
This commit is contained in:
parent
abf28f42fb
commit
2e4bb13cf1
@ -32,7 +32,7 @@ class Plugs extends Controller
|
|||||||
{
|
{
|
||||||
$this->title = '图标选择器';
|
$this->title = '图标选择器';
|
||||||
$this->field = input('field', 'icon');
|
$this->field = input('field', 'icon');
|
||||||
$this->fetch();
|
$this->fetch(realpath(__DIR__ . '/../../view/api/icon.html'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,24 +41,11 @@ class Upload extends Controller
|
|||||||
foreach (explode(',', sysconf('storage.allow_exts')) as $ext) {
|
foreach (explode(',', sysconf('storage.allow_exts')) as $ext) {
|
||||||
$data['exts'][$ext] = Storage::mime($ext);
|
$data['exts'][$ext] = Storage::mime($ext);
|
||||||
}
|
}
|
||||||
$template = realpath(__DIR__ . '/../../view/api/plugs/upload.js');
|
$template = realpath(__DIR__ . '/../../view/api/upload.js');
|
||||||
$data['exts'] = json_encode($data['exts'], JSON_UNESCAPED_UNICODE);
|
$data['exts'] = json_encode($data['exts'], JSON_UNESCAPED_UNICODE);
|
||||||
return view($template, $data)->contentType('application/x-javascript');
|
return view($template, $data)->contentType('application/x-javascript');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传安全检查
|
|
||||||
* @login true
|
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
|
||||||
* @throws \think\db\exception\DbException
|
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
|
||||||
*/
|
|
||||||
public function check()
|
|
||||||
{
|
|
||||||
$exts = array_intersect(explode(',', input('exts', '')), explode(',', sysconf('storage.allow_exts')));
|
|
||||||
$this->success('获取文件上传参数', ['exts' => join('|', $exts), 'mime' => Storage::mime($exts)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查文件上传已经上传
|
* 检查文件上传已经上传
|
||||||
* @login true
|
* @login true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user