初始版本
This commit is contained in:
63
server/app/api/controller/CoachController.php
Executable file
63
server/app/api/controller/CoachController.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<?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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user