...
|
...
|
@@ -35,6 +35,7 @@ class Index extends Api |
|
|
{
|
|
|
"id": 1,//轮播图id
|
|
|
"image": ""//图片路径
|
|
|
"url": ""//跳转链接
|
|
|
},
|
|
|
{
|
|
|
"id": 2,
|
...
|
...
|
@@ -44,6 +45,7 @@ class Index extends Api |
|
|
"res_advert": {//活动广告位(没有则不显示)
|
|
|
"id": 1,//id
|
|
|
"image": "http://jinglong.springchunjia.cn/uploads/20191127/febfea9a34c918cb2f100f669ede2547.png"//图片路径
|
|
|
"url": ""//跳转链接
|
|
|
},
|
|
|
"res_design": [//设计师作品
|
|
|
{
|
...
|
...
|
@@ -96,14 +98,14 @@ class Index extends Api |
|
|
if($this->request->isGet()){
|
|
|
$arr = [];
|
|
|
//轮播图
|
|
|
$res_banner = Common::selectData('banner','id,image');
|
|
|
$res_banner = Common::selectData('banner','id,image,url');
|
|
|
foreach ($res_banner as &$b_value){
|
|
|
$b_value['image'] = $this->auth->absolutionUrlOne($b_value['image']);
|
|
|
}
|
|
|
$arr['res_banner'] = $res_banner;
|
|
|
|
|
|
//首页广告位
|
|
|
$res_advert = Common::findWhereData('advert',['type'=>0],'id,image');
|
|
|
$res_advert = Common::findWhereData('advert',['type'=>0],'id,image,url');
|
|
|
if($res_advert){
|
|
|
$res_advert['image'] = $this->auth->absolutionUrlOne($res_advert['image']);
|
|
|
}
|
...
|
...
|
@@ -159,12 +161,13 @@ class Index extends Api |
|
|
"data": {//没有则不显示
|
|
|
"id": 2,//弹窗广告位id
|
|
|
"image": "http://jinglong.springchunjia.cn/uploads/20191127/0b20812d4f80307dd1025db71d690395.png"//图片路径
|
|
|
"url": ""//跳转链接
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function popupAdvert(){
|
|
|
if($this->request->isGet()){
|
|
|
$res = Common::findWhereData('advert',['type'=>1],'id,image');
|
|
|
$res = Common::findWhereData('advert',['type'=>1],'id,image,url');
|
|
|
if($res){
|
|
|
$res['image'] = $this->auth->absolutionUrlOne($res['image']);
|
|
|
}
|
...
|
...
|
|