add:俱乐部
This commit is contained in:
30
addons/shopro/controller/zy/Club.php
Normal file
30
addons/shopro/controller/zy/Club.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro\controller\zy;
|
||||
|
||||
|
||||
class Club extends Base
|
||||
{
|
||||
|
||||
// protected $noNeedLogin = ['index'];
|
||||
protected $noNeedLogin = ['*'];
|
||||
protected $noNeedRight = ['*'];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new \app\admin\model\zy\Club;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$model = $this->model;
|
||||
if (isset($params['name'])) {
|
||||
$model->where('name', 'like', '%' . $params['name'] . '%');
|
||||
}
|
||||
$res = $model->select();
|
||||
|
||||
$this->success('获取成功', $res);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user