DituController.php 750 字节
<?php
namespace app\admin\controller;

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

class DituController extends AdminBaseController{


  //后台地图页显示
  public function index(){

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

  }

  //后台地图编辑
  public function dupdata(){

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


  }



}









 ?>