Commit aff08ebf authored by 姚书霞's avatar 姚书霞 🐘

修改分页

parent 5a12dcc0
......@@ -43,11 +43,14 @@ class ShopUserMembergradeController extends BaseController
$requestParams = Yii::$app->getRequest()->get();
$query = $this->modelClass::find();
return Yii::createObject([
'class' => ActiveDataProvider::className(),
'query' => $query,
'pagination' => $requestParams,
]);
return new ActiveDataProvider(
[
'query' => $query,
'pagination' => [
'pageSize'=>$requestParams['pageSize']??20,
]
]
);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment