diff --git a/app/admin/controller/merchant/system/merchant/Merchant.php b/app/admin/controller/merchant/system/merchant/Merchant.php index 6961c20..f13db3f 100644 --- a/app/admin/controller/merchant/system/merchant/Merchant.php +++ b/app/admin/controller/merchant/system/merchant/Merchant.php @@ -9,8 +9,14 @@ namespace app\admin\controller\merchant\system\merchant; use think\App; +use think\facade\View; +use think\exception\ValidateException; + use app\admin\BaseController; use app\common\model\merchant\system\merchant\Merchant as MerchantModel; +use app\common\model\merchant\system\merchant\MerchantCategory; +use app\common\model\merchant\system\merchant\MerchantType; + class Merchant extends BaseController{ @@ -24,13 +30,23 @@ class Merchant extends BaseController{ 'mark' => 'merchant/system/merchant/merchant/mark' ]; - public function __construct(App $app) + public function __construct(App $app, MerchantModel $model) { parent::__construct($app); + $this->model = $model; } - public function index() + public function index(MerchantCategory $category, MerchantType $type) { + // 商户分类 + $category = $category->select(); + + // 店铺类弄 + $type = $type->select(); + + View::assign('category',$category); + View::assign('type',$type); + return View($this->path['index']); } @@ -39,15 +55,20 @@ class Merchant extends BaseController{ */ public function lst() { - [$page, $limit] = $this->getPage(); - $where = $this->request->params(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id']); - return app('json')->success($this->repository->lst($where, $page, $limit)); + $page = empty($params['page'])?1:$params['page']; + $limit = empty($params['limit'])?10:$params['limit']; + + $where = get_params(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id']); + + $data = $this->model->lst($where, $page, $limit); + + return to_assign(0, '', $data); } public function count() { - $where = $this->request->params(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id']); - return app('json')->success($this->repository->count($where)); + $where = get_params(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id']); + return app('json')->success($this->model->count($where)); } } \ No newline at end of file diff --git a/app/admin/controller/merchant/system/merchant/MerchantIntention.php b/app/admin/controller/merchant/system/merchant/MerchantIntention.php index 86a3e58..d0e6c51 100644 --- a/app/admin/controller/merchant/system/merchant/MerchantIntention.php +++ b/app/admin/controller/merchant/system/merchant/MerchantIntention.php @@ -47,7 +47,6 @@ class MerchantIntention extends BaseController // 商户分类 $category = $category->select(); - //审核 // 店铺类弄 $type = $type->select(); // search diff --git a/app/admin/view/merchant/system/merchant/merchant/lst.html b/app/admin/view/merchant/system/merchant/merchant/lst.html index d28a978..0d77a94 100644 --- a/app/admin/view/merchant/system/merchant/merchant/lst.html +++ b/app/admin/view/merchant/system/merchant/merchant/lst.html @@ -167,8 +167,8 @@
@@ -198,8 +198,10 @@ @@ -207,9 +209,8 @@ @@ -225,7 +226,7 @@ layui.payTable = table.render({ elem: '#pay_list', - title: '保证金列表', + title: '正常开启的商户', toolbar: '#toolbarDemo', url: '/admin/margin/lst', page: true, @@ -295,7 +296,7 @@ field: 'right', title: '操作', toolbar: '#barDemo', - width: 190, + width: 200, align: 'center' } ]