use think\Facade\Db; //引用Db
public function getList()
{
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$limit = isset($_GET['limit']) ? intval($_GET['limit']) : 10;
$name = isset($_GET["name"]) ? $_GET["name"] : '';
//使用“Db::table”需带上表前缀
//$mode = Db::table("my_set_config_big_class"); // 实例化对象
//使用“Db::name”不用带上表前缀
$mode = Db::name('set_config_big_class');
$where = "name like '%".$name."%'";
$list = $mode->where($where)->order('id asc')->limit(($page-1)*$limit,$limit)->select();
$count = $mode->count(); //总记录数
$data = [
'code' => 0,
'msg' => '',
'count' => $count,
'data' => $list,
];
echo json_encode($data);
}