TimelimitsgroupController.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace mobile\controllers;
  3. use mobile\base\CommonController;
  4. use Yii;
  5. use mobile\base\Help;
  6. use mobile\server\TimeLimitsGroupServer;
  7. class TimelimitsgroupController extends CommonController{
  8. public function actionIndex()
  9. {
  10. $city=$this->City();
  11. return $this->render('index',['city'=>$city]);
  12. }
  13. public function actionGethouselist()
  14. {
  15. $modelServer = new TimeLimitsGroupServer();
  16. $rows = $modelServer->GroupHouselist(Yii::$app->request->get());
  17. if(!empty($rows))
  18. {
  19. return Help::JsonCode(Help::SUCCESS,'成功',$rows['data']);
  20. }
  21. return Help::JsonCode(Help::ERROR,'暂无相关楼盘数据');
  22. }
  23. private function City()
  24. {
  25. $city = new \common\models\CategoryCity();
  26. $city->state = 1;
  27. $city->pid = 0;
  28. $cityModel = $city->getList([]);
  29. return $cityModel;
  30. }
  31. public function actionIndextest()
  32. {
  33. $city=$this->City();
  34. return $this->render('indextest',['city'=>$city]);
  35. }
  36. }