...
|
...
|
@@ -5,7 +5,6 @@ namespace app\api\controller; |
|
|
use app\common\controller\Api;
|
|
|
use app\common\model\Active;
|
|
|
use app\common\model\Item;
|
|
|
use app\common\model\ItemDetails;
|
|
|
|
|
|
/**
|
|
|
* 活动接口
|
...
|
...
|
@@ -19,7 +18,6 @@ class Activity extends Api |
|
|
/**
|
|
|
* @ApiTitle (活动首页)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiParams (name="row", type="string", required=false, description="每页显示行数[非必填]")
|
|
|
* @ApiParams (name="page", type="string", required=false, description="当前页[非必填]")
|
|
|
* @ApiReturn ({"code":状态码,
|
|
|
"msg":"提示信息"
|
...
|
...
|
@@ -34,13 +32,10 @@ class Activity extends Api |
|
|
*/
|
|
|
public function index()
|
|
|
{
|
|
|
$row = $this->request->param('row');
|
|
|
$page = $this->request->param('page');
|
|
|
$row = $row ? $row : 10;
|
|
|
$page = $page ? $page : 1;
|
|
|
$data = db('activity')
|
|
|
->order('createtime DESC')
|
|
|
->paginate($row,false,['page'=>$page])
|
|
|
->paginate(10,false,['page'=>$page])
|
|
|
->each(function ($item,$key){
|
|
|
$item['images'] = cdnurl($item['image'], true);
|
|
|
$item['createtime'] = date('Y-m-d', $item['createtime']);
|
...
|
...
|
|