33 lines
662 B
PHP
33 lines
662 B
PHP
<?php
|
|
|
|
namespace addons\shopro\controller\zy;
|
|
|
|
|
|
|
|
class Gym extends Base
|
|
{
|
|
|
|
// protected $noNeedLogin = ['index'];
|
|
protected $noNeedLogin = ['*'];
|
|
protected $noNeedRight = ['*'];
|
|
|
|
public function __construct()
|
|
{
|
|
$this->model = new \app\admin\model\zy\Stadium;
|
|
parent::__construct();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$params = $this->request->param();
|
|
$model = $this->model->where('status', 1);
|
|
if (isset($params['name'])) {
|
|
$model->where('name', 'like', '%' . $params['name'] . '%');
|
|
}
|
|
$res = $model->select();
|
|
|
|
|
|
$this->success('获取成功', $res);
|
|
}
|
|
}
|