diff --git a/app/common/repositories/system/merchant/MerchantCategoryRepository.php b/app/common/repositories/system/merchant/MerchantCategoryRepository.php index 41d665fd..167eaf42 100644 --- a/app/common/repositories/system/merchant/MerchantCategoryRepository.php +++ b/app/common/repositories/system/merchant/MerchantCategoryRepository.php @@ -114,10 +114,17 @@ class MerchantCategoryRepository extends BaseRepository * @Date: 2020/9/15 * @return array */ - public function getSelect() + public function getSelect($v2=0) { $query = $this->search([])->field('merchant_category_id,category_name,background'); $list = $query->select()->toArray(); + if ($v2) { + foreach($list as $k=>$v) { + if ($v['category_name'] == '区域特色') { + unset($list[$k]); + } + } + } return $list; } } diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 07c3f38c..b17cbaa1 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -157,6 +157,18 @@ class MerchantIntention extends BaseController 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() { /** @var MerchantTypeRepository $repo */ diff --git a/route/api.php b/route/api.php index 25110f3e..0574cb61 100644 --- a/route/api.php +++ b/route/api.php @@ -549,6 +549,7 @@ Route::group('api/', function () { //申请商户 Route::post('intention/create', 'api.store.merchant.MerchantIntention/create'); 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::post('common/visit', 'api.Common/visit');