返回系统模块对应控......登陆

系统模块对应控制器代码

phpcn_u887332019-02-26 21:23:06250
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/2/26
 * Time: 20:42
 */

namespace app\admin\controller;

use app\admin\controller\Common;
use app\admin\model\SystemModel;
use think\facade\Request;

class System extends Common
{
    public function index()
    {
        $system = SystemModel::get(1);
        $this->assign('system',$system);
        return $this->fetch();
    }

    public function doAdd()
    {
        $data = Request::param();

        $systemModel = new SystemModel();
        if($systemModel->isUpdate(true)->save($data)){
            return ['status'=>0,'msg'=>'保存成功'];
        }
    }
}


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送