2025-05-20 16:33:23 +08:00
|
|
|
<?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 = "条数")
|
2025-07-03 17:59:32 +08:00
|
|
|
* @ApiParams(name = "status", type = "string",required=true,description = "放置类型:1=顶部,2=服务青年专栏")
|
2025-05-20 16:33:23 +08:00
|
|
|
* @ApiReturn({
|
|
|
|
*
|
|
|
|
*})
|
|
|
|
*/
|
|
|
|
public function images()
|
|
|
|
{
|
|
|
|
$user_id = 0;
|
|
|
|
$user = $this->auth->getUser();//登录用户
|
|
|
|
if($user)$user_id = $user['id'];
|
2025-07-03 17:59:32 +08:00
|
|
|
$params=[];
|
|
|
|
$page = $this->request->get('page/d', 0); //页数
|
|
|
|
$limit = $this->request->get('limit/d', 0); //条数
|
|
|
|
$params["status"] = $this->request->get('status/s', ""); //条数
|
2025-05-20 16:33:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
//当前申请状态
|
2025-07-03 17:59:32 +08:00
|
|
|
$res = Images::allList($page, $limit,$params);
|
2025-05-20 16:33:23 +08:00
|
|
|
|
|
|
|
}catch (\Exception $e){
|
|
|
|
|
|
|
|
$this->error($e->getMessage());
|
|
|
|
}
|
|
|
|
$this->success('查询成功', $res);
|
|
|
|
}
|
|
|
|
}
|