CityServer.php 895 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/6/7
  6. * Time: 上午10:39
  7. */
  8. namespace mobile\server;
  9. use common\models\PushmMenu;
  10. use Yii;
  11. use common\models\CategoryCity;
  12. class CityServer{
  13. /*
  14. * 根据区域ID返回不同的菜单栏
  15. */
  16. public function CityMenu()
  17. {
  18. }
  19. //国内
  20. public function CityAbroad_a()
  21. {
  22. $model = new CategoryCity();
  23. $model->abroad = 1;
  24. //国内
  25. $result = $model->getList([],['id','city_name','a','ll','pid']);
  26. if($result)
  27. {
  28. return $result;
  29. }
  30. }
  31. //国外
  32. public function CityAbroad_b()
  33. {
  34. $model = new CategoryCity();
  35. $model->abroad = 2;
  36. //国内
  37. $result = $model->getList([],['id','city_name','a','ll','pid']);
  38. if($result)
  39. {
  40. return $result;
  41. }
  42. }
  43. }