qinzexin acf45ddd0c 服务青年九宫格图片跳转接口
团务百科需要增加分类

Signed-off-by: qinzexin <“731344816@qq.com”>
2025-07-03 17:59:32 +08:00

52 lines
1.3 KiB
PHP

<?php
namespace app\api\controller;
use app\api\controller\home\Base;
use app\common\controller\Api;
use app\common\model\home\Images;
/**
* 首页接口
*/
class Index extends Base
{
protected $noNeedLogin = ['*'];
protected $noNeedRight = ['*'];
/**
* @ApiTitle( 首页轮播图)
* @ApiSummary(首页轮播图)
* @ApiMethod(GET)
* @ApiParams(name = "page", type = "string",required=true,description = "页数")
* @ApiParams(name = "limit", type = "string",required=true,description = "条数")
* @ApiParams(name = "status", type = "string",required=true,description = "放置类型:1=顶部,2=服务青年专栏")
* @ApiReturn({
*
*})
*/
public function images()
{
$user_id = 0;
$user = $this->auth->getUser();//登录用户
if($user)$user_id = $user['id'];
$params=[];
$page = $this->request->get('page/d', 0); //页数
$limit = $this->request->get('limit/d', 0); //条数
$params["status"] = $this->request->get('status/s', ""); //条数
try{
//当前申请状态
$res = Images::allList($page, $limit,$params);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success('查询成功', $res);
}
}