<?php
namespace app\admin\controller;
use think\App;
use think\facade\Session;
use think\facade\View;
use think\facade\Request;
 
class system extends Base{

	//system首页
    public function index(){
		$tdata=Request::param();
		$info=\app\admin\model\System::find(1);
		
		View::assign(['info'=>$info]);
		return View::fetch();
    }

	//system修改
    public function update(){
		IS_AJAX(Request::isAjax());
		$tdata=Request::param();
		
		$tdata['id']=1;
		$system_id=\app\admin\model\System::strict(false)->update($tdata);
		
		//添加日志
		$log=\app\admin\model\Log::insert('修改系统设置内容');

		$data =['type' =>2,'msg' =>'修改成功'];
		return json($data);
		return View::fetch();
    }
	
}
