Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user