作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

热卖爆品查看更多

... ... @@ -193,6 +193,28 @@ class Index extends Api
}
/**
* 热卖爆品(首页-热卖爆品-查看更多)
* @ApiMethod (GET)
* @ApiParams (name="rows", type="integer", description="每页条数")
* @ApiParams (name="page", type="integer", required=true, description="页码")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturnParams (name="data", type="object", description="扩展数据返回")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function hotGoodsList()
{
$rows = $this->request->request('rows',null);// 每页条数
$page = $this->request->request('page',1);// 页码
$list = Goods::getList(['ishot'=>'1'],$page,$rows);
// 返回结果
$this->success(__('成功'),compact('list'));
}
/**
* 商品详情
* @ApiMethod (GET)
* @ApiParams (name="goods_id", type="integer", required=true, description="商品ID")
... ...
此 diff 太大无法显示。