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

合并分支 'heshupeng' 到 'master'

周边热点banner



查看合并请求 !296
... ... @@ -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 (商圈信息列表)
... ...