摘要:<?phpnamespace app\admin\controller;use think\Controller;use think\facade\Session;use think\facade\Request;use app\admin\controller\Common;use app\admin\model\system as systemModel;class System ext
<?php
namespace app\admin\controller;
use think\Controller;
use think\facade\Session;
use think\facade\Request;
use app\admin\controller\Common;
use app\admin\model\system as systemModel;
class System extends Common
{
public function index()
{
$system = systemModel::get(1);
$this->view->system = $system;
return $this->fetch();
}
public function add()
{
$data = request::param();
$system = systemModel::update($data);
if($system){
return ['res' => 1, 'msg' => '添加成功:'];
}else{
return ['res' => 0, 'msg' => '添加失败:'];
}
}
}
批改老师:韦小宝批改时间:2019-01-26 09:27:09
老师总结:写的很不错 和之前提交的作业一样 基本上都是一些类似的增删改查 我就给你一样的回复咯