DialogController.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2013-present http://www.thinkcmf.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 老猫 <zxxjjforever@163.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\admin\controller;
  12. use cmf\controller\AdminBaseController;
  13. class DialogController extends AdminBaseController
  14. {
  15. public function initialize()
  16. {
  17. }
  18. public function map()
  19. {
  20. $location = $this->request->param('location');
  21. $location = explode(',', $location);
  22. $lng = empty($location[0]) ? 116.424966 : $location[0];
  23. $lat = empty($location[1]) ? 39.907851 : $location[1];
  24. $this->assign(['lng' => $lng, 'lat' => $lat]);
  25. return $this->fetch();
  26. }
  27. }