This commit is contained in:
2025-08-15 18:18:38 +08:00
parent 9cd35ba01c
commit fa687d1106
2 changed files with 4 additions and 6 deletions

View File

@@ -18,14 +18,12 @@ class HelpWordController extends Frontend
$this->error('参数不完整');
}
$word = new HelpClassify;
$word->connect(Config('think-orm.search_library'));
$result = $word
->with('helpword')
$result = Db::connect(config('think-orm.search_library'))->name('help_classify')
->where('types', $get['types'])->select()->toArray();
$result = convertToCamelCase($result);
foreach ($result as $k => $v) {
$result[$k]['helpWordList'] = convertToCamelCase($v['helpword']);
unset($result[$k]['helpword']);
$result[$k]['helpWordList'] = Db::connect(config('think-orm.search_library'))->name('help_word')
->where('help_classify_id', $v['helpClassifyId'])->select()->toArray();
}
$this->success('ok', $result);
}