48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace app\api\controller;
|
|
|
|
use app\api\QfShop;
|
|
use app\model\Source as SourceModel;
|
|
use app\model\SourceCategory as SourceCategoryModel;
|
|
|
|
class Search extends QfShop
|
|
{
|
|
public function index()
|
|
{
|
|
$SourceModel = new SourceModel();
|
|
$data = $SourceModel->getList(input(''));
|
|
return jok('获取成功',$data);
|
|
}
|
|
|
|
public function getDetail()
|
|
{
|
|
$SourceModel = new SourceModel();
|
|
$data = $SourceModel->getDetail(input(''));
|
|
return jok('获取成功',$data);
|
|
}
|
|
|
|
public function getNew()
|
|
{
|
|
$SourceModel = new SourceModel();
|
|
$data = input('');
|
|
$data['page_size'] = $data['page_size']??20;
|
|
$data = $SourceModel->getNew($data);
|
|
return jok('获取成功',$data);
|
|
}
|
|
|
|
public function getHot()
|
|
{
|
|
$SourceModel = new SourceModel();
|
|
$data = $SourceModel->getHot(input(''));
|
|
return jok('获取成功',$data);
|
|
}
|
|
|
|
public function getCategory()
|
|
{
|
|
$SourceCategoryModel = new SourceCategoryModel();
|
|
$data = $SourceCategoryModel->getList(input(''));
|
|
return jok('获取成功',$data);
|
|
}
|
|
}
|