setter
parent
bafc537b55
commit
1e8e98f998
|
@ -174,6 +174,25 @@ class Consumer extends Base
|
||||||
return $this->json(1,"ok",$list["list"]);
|
return $this->json(1,"ok",$list["list"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告列表
|
||||||
|
* */
|
||||||
|
public function advertisement()
|
||||||
|
{
|
||||||
|
$repo = OperationRepository::getInstance();
|
||||||
|
$whereMap = [];
|
||||||
|
$orders = ['sort'=>'asc'];
|
||||||
|
$page = input("page/d",1);
|
||||||
|
$size = input("size/d",1000);
|
||||||
|
$whereMap[] = ['position', '=', Slide::advertisement];
|
||||||
|
$list = $repo->slideList($whereMap, ["id","title","src as image","url","url_type as type"], $page, $size, function ($q){
|
||||||
|
return $q->withAttr("image",function ($value){
|
||||||
|
return $this->request->domain() . $value;
|
||||||
|
});
|
||||||
|
}, $orders);
|
||||||
|
return $this->json(1,"ok",$list["list"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关注/取消关注一个商家
|
* 关注/取消关注一个商家
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace app\model;
|
||||||
class Slide extends Base
|
class Slide extends Base
|
||||||
{
|
{
|
||||||
public const homePosition = "home-banner";
|
public const homePosition = "home-banner";
|
||||||
|
public const advertisement = "advertisement";
|
||||||
public static function delByIds($ids)
|
public static function delByIds($ids)
|
||||||
{
|
{
|
||||||
return self::whereIn('id', $ids)->delete();
|
return self::whereIn('id', $ids)->delete();
|
||||||
|
|
Loading…
Reference in New Issue