Files
webman_duanju/app/czg/app/controller/HelpWordController.php
2025-08-14 17:19:26 +08:00

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