亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

系統(tǒng)模塊練習(xí)

Original 2019-04-07 21:25:55 251
abstract:<?php /**  * Created by PhpStorm.  * User: Admin  * Date: 2019/4/7  * Time: 20:39  */ namespace app\admin\controller; use
<?php


namespace app\admin\controller;
use app\admin\controller\Common;
use think\Db;
use think\facade\Request;

class System extends Common
{
    public function index()
    {
        //獲取數(shù)據(jù)
        $system=Db::table('system')->find();
        $this->view->system=$system;
        return $this->fetch();
    }
    public function edit()
    {
       $data=Request::param();
       var_dump($data);
       if(Db::table('system')->where('id',$data['id'])->update([
           'site_name'=>$data['site_name'],
           'about_title'=>$data['about_title'],
           'about_content'=>$data['about_content'],
           'pro_title'=>$data['pro_title'],
           'pro_content'=>$data['pro_content'],
           'xc_title'=>$data['xc_title'],
           'xc_content'=>$data['xc_content']
       ])){
           return ['res'=>1,'msg'=>'修改成功'];
       }else{
           return ['res'=>0,'msg'=>'修改失敗'];
       }
    }
}


Correcting teacher:天蓬老師Correction time:2019-04-08 09:37:23
Teacher's summary:if(Db::table('system')->where('id',$data['id'])->update([ 'site_name'=>$data['site_name'], 'about_title'=>$data['about_title'], 'about_content'=>$data['

Release Notes

Popular Entries