Merge remote-tracking branch 'origin/master'

This commit is contained in:
张松
2025-08-15 18:19:17 +08:00
2 changed files with 4 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ class Frontend
$this->auth = Auth::instance();
$token = request()->header('token');
if ($token) {
if(request()->controller != 'app\czg\app\controller\LoginController' && request()->action != 'index'){} {
if(!strstr(request()->controller, 'LoginController') && request()->action != 'index') {
if(!$this->auth->init($token)) {
$this->error('Token expiration', [], 401);
}

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);
}