...
|
...
|
@@ -26,7 +26,7 @@ use think\Request; |
|
|
*/
|
|
|
class Hot extends Api
|
|
|
{
|
|
|
protected $noNeedLogin = [];
|
|
|
protected $noNeedLogin = ['banner'];
|
|
|
protected $noNeedRight = ['*'];
|
|
|
protected $store_model;
|
|
|
protected $store_inform_model;
|
...
|
...
|
@@ -51,6 +51,39 @@ class Hot extends Api |
|
|
|
|
|
/**
|
|
|
* 商圈信息列表
|
|
|
* @ApiWeigh (90)
|
|
|
* @ApiTitle (首页轮播图)
|
|
|
* @ApiSummary (首页轮播图)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/hot/banner)
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
|
|
"msg": "success",
|
|
|
"time": "1600064624",
|
|
|
"data": [{
|
|
|
"id": 1,
|
|
|
"image": "http://community.qiniu.brotop.cn/uploads/20200910/0afb1f6a54b2ca30a2fa3f3f6cafbd3f.jpg",
|
|
|
"weigh": 1,
|
|
|
"createtime": "2020-09-10 11:47:28"
|
|
|
}]
|
|
|
})
|
|
|
*/
|
|
|
public function banner()
|
|
|
{
|
|
|
$data = Db::name('store_banner')
|
|
|
->field('updatetime',true)
|
|
|
->order(['weigh'=>'desc','createtime'=>'asc'])
|
|
|
->select();
|
|
|
foreach ($data as &$v){
|
|
|
$v['image'] = cdnurl($v['image'],true);
|
|
|
$v['createtime'] = date('Y-m-d H:i:s',$v['createtime']);
|
|
|
}
|
|
|
$this->success('success',$data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 商圈信息列表
|
|
|
* @ApiWeigh (80)
|
|
|
*
|
|
|
* @ApiTitle (商圈信息列表)
|
...
|
...
|
|