You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
420 B

<?php
namespace app\appapi\controller\v1;
use app\appapi\ApiController;
use think\facade\Db;
class Home extends ApiController
{
public function getBanner(){
$ads=Db::name('ad')
->where('position_id',1)
->select()
->toArray();
foreach($ads as $key => $val){
$ads[$key]['ad_code'] = getUrl().'/'.$val['ad_code'];
}
return $this->Success($ads);
}
}