MapController.php 724 字节
<?php
namespace app\admin\controller;

use cmf\controller\AdminBaseController;
use think\Db;
use app\admin\model\AdminMenuModel;

class MapController extends AdminBaseController{

  //显示地图页
  public function maplist(){

    $data = Db::name('map') -> find();
    $this -> assign('data',$data);
    return $this -> fetch();


  }


  //更新地图数据
  public function mapup(){

    $data['title'] = input('post.title');
    $data['address'] = input('post.address');
    $data['jingdu'] = input('post.jingdu');
    $data['weidu'] =input('post.weidu');
    $data = Db::name('map') -> where('id',1) -> update($data);
    if($data){
      return true;
    }else{
      return false;
    }


  }




}










 ?>