commit
1e7e676592
@ -114,10 +114,17 @@ class MerchantCategoryRepository extends BaseRepository
|
|||||||
* @Date: 2020/9/15
|
* @Date: 2020/9/15
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getSelect()
|
public function getSelect($v2=0)
|
||||||
{
|
{
|
||||||
$query = $this->search([])->field('merchant_category_id,category_name,background');
|
$query = $this->search([])->field('merchant_category_id,category_name,background');
|
||||||
$list = $query->select()->toArray();
|
$list = $query->select()->toArray();
|
||||||
|
if ($v2) {
|
||||||
|
foreach($list as $k=>$v) {
|
||||||
|
if ($v['category_name'] == '区域特色') {
|
||||||
|
unset($list[$k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,6 +157,18 @@ class MerchantIntention extends BaseController
|
|||||||
return app('json')->success($lst);
|
return app('json')->success($lst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* v2商户分类
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/9/15
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function v2CateLst()
|
||||||
|
{
|
||||||
|
$lst = app()->make(MerchantCategoryRepository::class)->getSelect(1);
|
||||||
|
return app('json')->success($lst);
|
||||||
|
}
|
||||||
|
|
||||||
public function typeLst()
|
public function typeLst()
|
||||||
{
|
{
|
||||||
/** @var MerchantTypeRepository $repo */
|
/** @var MerchantTypeRepository $repo */
|
||||||
|
@ -549,6 +549,7 @@ Route::group('api/', function () {
|
|||||||
//申请商户
|
//申请商户
|
||||||
Route::post('intention/create', 'api.store.merchant.MerchantIntention/create');
|
Route::post('intention/create', 'api.store.merchant.MerchantIntention/create');
|
||||||
Route::get('intention/cate', 'api.store.merchant.MerchantIntention/cateLst');
|
Route::get('intention/cate', 'api.store.merchant.MerchantIntention/cateLst');
|
||||||
|
Route::get('intention/v2/cate', 'api.store.merchant.MerchantIntention/v2CateLst');
|
||||||
Route::get('intention/type', 'api.store.merchant.MerchantIntention/typeLst');
|
Route::get('intention/type', 'api.store.merchant.MerchantIntention/typeLst');
|
||||||
//浏览
|
//浏览
|
||||||
Route::post('common/visit', 'api.Common/visit');
|
Route::post('common/visit', 'api.Common/visit');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user