first commit
This commit is contained in:
61
app/api/controller/TeamController.php
Normal file
61
app/api/controller/TeamController.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user