Files
zzp-server/app/api/controller/TeamController.php
2026-01-19 14:19:22 +08:00

61 lines
1.5 KiB
PHP

<?php
namespace app\api\controller;
use app\api\logic\TeamLogic;
use app\api\lists\team\{TeamUserLists};
use think\facade\Request;
/**
* 团队控制器
* Class TeamController
* @package app\shopapi\controller
*/
class TeamController extends BaseApiController
{
/**
* @notes 团队列表
* @return \think\response\Json
* @author BD
* @date 2024/2/23 18:55
*/
public function lists()
{
return $this->dataLists(new TeamUserLists());
}
/**
* @notes 团队首页数据
* @return Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/02/22 10:54
*/
public function index()
{
$params = $this->request->get();
$params['user_id'] = $this->userId;
$params['host'] = Request::header('origin');
$result = TeamLogic::getIndexData($params);
return $this->data($result);
}
/**
* @notes 团队首页数据2
* @return Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/02/22 10:54
*/
public function indexReport()
{
$params = $this->request->get();
$params['user_id'] = $this->userId;
$result = TeamLogic::getIndexReport($params);
return $this->data($result);
}
}