63 lines
1.4 KiB
PHP
Executable File
63 lines
1.4 KiB
PHP
Executable File
<?php
|
|
namespace app\api\controller;
|
|
use app\api\lists\CoachLists;
|
|
use app\api\logic\CoachLogic;
|
|
|
|
/**
|
|
* 技师控制器类
|
|
* Class CoachController
|
|
* @package app\api\controller
|
|
*/
|
|
class CoachController extends BaseApiController
|
|
{
|
|
public array $notNeedLogin = ['skillLists','lists','detail'];
|
|
|
|
|
|
|
|
/**
|
|
* @notes 技能列表
|
|
* @return \think\response\Json
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
* @author cjhao
|
|
* @date 2024/9/4 17:03
|
|
*/
|
|
public function skillLists()
|
|
{
|
|
$data = ((new CoachLogic())->skillLists());
|
|
return $this->success('',$data);
|
|
}
|
|
/**
|
|
* @notes 获取技师列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/9/3 23:37
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists((new CoachLists()));
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* @notes 详情
|
|
* @return \think\response\Json
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
* @author cjhao
|
|
* @date 2024/9/4 17:05
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = $this->request->get();
|
|
$params['user_id'] = $this->userId;
|
|
$data = (new CoachLogic())->detail($params);
|
|
return $this->success('',$data);
|
|
|
|
}
|
|
|
|
|
|
} |