Update Ajax.php

This commit is contained in:
wolfcode
2023-11-11 11:23:51 +08:00
parent 031f1adb1c
commit ff8b20a4b9

View File

@@ -175,11 +175,7 @@ class Ajax extends AdminController
return $this->error($e->getMessage());
}
case 'listImage':
$res = (new SystemUploadfile())->order($this->sort)->limit(100)->column('url');
$list = [];
array_map(function ($value) use (&$list) {
$list[] = ['url' => $value,];
}, $res);
$list = (new SystemUploadfile())->order($this->sort)->limit(100)->field('url')->select()->toArray();
$result = [
"state" => "SUCCESS",
"list" => $list,