更新目录结构

This commit is contained in:
molong
2022-04-29 20:26:03 +08:00
parent 4ef43e0258
commit ca1fbd6fd1
89 changed files with 529 additions and 381 deletions

View File

@@ -8,9 +8,9 @@
// +----------------------------------------------------------------------
namespace app\controller;
use app\model\Config;
use app\model\Hooks;
use app\model\SeoRule;
use app\model\system\Config;
use app\model\addons\Hooks;
use app\model\system\SeoRule;
use think\App;
use think\exception\ValidateException;
use think\facade\Cache;
@@ -76,7 +76,7 @@ class Base {
}
$hooks = Cache::get('sentcms_hooks');
if (!$hooks) {
$hooks = Hooks::where('status', 1)->column('addons', 'name');
$hooks = Hooks::where('status', 1)->where('addons', '<>', '')->column('addons', 'name');
foreach ($hooks as $key => $values) {
if (is_string($values)) {
$values = explode(',', $values);
@@ -247,7 +247,7 @@ class Base {
$config = [];
$addons = $this->request->param('addon');
$addon = get_addons_instance($addons)->getConfig();
$config = \app\model\Addons::where('name', $addons)->value('config');
$config = \app\model\addons\Addons::where('name', $addons)->value('config');
return $config ? json_decode($config, true) : $addon;
}