This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/api/controller/Shop.php

41 lines
846 B
PHP
Raw Normal View History

2020-04-25 22:20:29 +08:00
<?php
namespace app\api\controller;
use app\api\model\store\Shop as ShopModel;
/**
* 门店列表
* Class Shop
* @package app\api\controller
*/
class Shop extends Controller
{
/**
* 门店列表
* @param string $longitude
* @param string $latitude
* @return array
* @throws \think\exception\DbException
*/
public function lists($longitude = '', $latitude = '')
{
$model = new ShopModel;
$list = $model->getList(true, $longitude, $latitude);
return $this->renderSuccess(compact('list'));
}
/**
* 门店详情
* @param $shop_id
* @return array
* @throws \think\exception\DbException
*/
public function detail($shop_id)
{
$detail = ShopModel::detail($shop_id);
return $this->renderSuccess(compact('detail'));
}
}