ApplyController.php 957 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace platform\controllers;
  3. use Yii;
  4. use yii\web\Controller;
  5. use common\components\util;
  6. use common\components\configDict;
  7. use common\components\weixinUtil;
  8. use common\components\page;
  9. use common\components\stringUtil;
  10. use common\models\xhMerchantAccount;
  11. class ApplyController extends PlatformController
  12. {
  13. /**
  14. * 申请列表
  15. */
  16. public function actionList()
  17. {
  18. $get = Yii::$app->request->get();
  19. $query = xhMerchantAccount::find();
  20. $countQuery = clone $query;
  21. $count = $countQuery->count();
  22. $page = isset($get['page']) ? $get['page'] : 1;
  23. $pageSize = 20;
  24. $offset = ($page - 1) * $pageSize;
  25. $models = $query->offset($offset)->orderBy('id desc')->limit($pageSize)->asArray()->all();
  26. $page = new page($count,$page,$pageSize);
  27. $paging = $page->fpage();
  28. $now = time();
  29. return $this->render('list', ['models' => $models,'paging' => $paging]);
  30. }
  31. }