添加轮播图
This commit is contained in:
@@ -4,9 +4,7 @@ namespace app\api\controller;
|
||||
|
||||
use app\common\controller\Api;
|
||||
use app\common\service\CategoryService;
|
||||
use fast\Tree;
|
||||
use think\exception\HttpResponseException;
|
||||
use think\Validate;
|
||||
|
||||
class Catalog extends Api
|
||||
{
|
||||
@@ -16,16 +14,16 @@ class Catalog extends Api
|
||||
/**
|
||||
* 分类列表
|
||||
*
|
||||
* @ApiMethod (POST)
|
||||
* @param string $desc 需求描述
|
||||
* @param array $images 图片数组
|
||||
* @param array $files 文件数组
|
||||
* @param string $contact 联系方式
|
||||
* @ApiMethod (GET)
|
||||
* @param string $type 栏目类型,banner 时返回首页轮播(name、image、description)
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
try {
|
||||
$params = $this->request->get();
|
||||
$type = (string)$this->request->get('type', '');
|
||||
if ($type === 'banner') {
|
||||
$this->success('', CategoryService::getBannerList());
|
||||
}
|
||||
$cateList = CategoryService::getOptions();
|
||||
$res = [
|
||||
['text' => '全部', 'key' => 0]
|
||||
|
||||
Reference in New Issue
Block a user