34 lines
885 B
PHP
34 lines
885 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;
|
|
$word->setConnection(Config('think-orm.search_library'));
|
|
$result = $word
|
|
->with('helpword')
|
|
->where('types', $get['types'])->select()->toArray();
|
|
$result = convertToCamelCase($result);
|
|
foreach ($result as $k => $v) {
|
|
$result[$k]['helpWordList'] = convertToCamelCase($v['helpword']);
|
|
unset($result[$k]['helpword']);
|
|
}
|
|
$this->success('ok', $result);
|
|
}
|
|
|
|
|
|
} |