32 lines
928 B
PHP
32 lines
928 B
PHP
<?php
|
|
|
|
namespace app\czg\app\controller;
|
|
|
|
use app\api\model\HelpClassify;
|
|
use app\api\model\UserMoney;
|
|
use app\common\controller\Frontend;
|
|
use think\facade\Db;
|
|
|
|
class HelpWordController extends Frontend
|
|
{
|
|
|
|
// 帮助中心
|
|
public function selectHelpList()
|
|
{
|
|
$get = $this->request->get();
|
|
if(empty($get['types'])) {
|
|
$this->error('参数不完整');
|
|
}
|
|
$word = new HelpClassify;
|
|
$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'] = Db::connect(config('think-orm.search_library'))->name('help_word')
|
|
->where('help_classify_id', $v['helpClassifyId'])->select()->toArray();
|
|
}
|
|
$this->success('ok', $result);
|
|
}
|
|
|
|
|
|
} |