test_service d3170b4d1c 1
2023-12-01 15:43:29 +08:00

33 lines
685 B
PHP

<?php
namespace app\api\controller\food;
use app\api\controller\food\Controller;
use app\api\model\food\Shop as ShopModel;
/**
* 商家门店控制器
*/
class Shop extends Controller
{
/**
* 门店列表
*/
public function lists()
{
$model = new ShopModel;
$list = $model->getList(false,10,$this->location);
return $this->renderSuccess(compact('list'));
}
/**
* 门店列表
*/
public function detail()
{
if($detail = ShopModel::detail($this->shop_id,$this->location)){
return $this->renderSuccess(compact('detail'));
}
return $this->renderError('门店不存在');
}
}