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

后臺管理系統(tǒng)--系統(tǒng)設置

Original 2019-05-27 23:40:11 383
abstract:<?php/** * Created by PhpStorm. * User: Administrator * Date: 2019/5/27 * Time: 22:54 */namespace app\admin\controller;use app\admin\controller\Common;use app\model\System as SystemModel;use think\

<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/5/27
* Time: 22:54
*/

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

class System extends Common
{
   public function index()
   {
       $system = SystemModel::get(1);
       $this->assign('system',$system);
       //渲染系統(tǒng)設置頁面
       return $this->fetch();
   }

   public function doEdit()
   {
       //獲取提交的數(shù)據(jù)
       $data = Request::param();
       $result = SystemModel::where('id',$data['id'])->update($data);
       if ($result) {
           return ['res'=>1,'msg'=>'保存成功'];
       } else {
           return ['res'=>0,'msg'=>'保存失敗'];
       }

   }
}

后臺管理系統(tǒng)--系統(tǒng)設置.png

Correcting teacher:天蓬老師Correction time:2019-05-28 17:01:10
Teacher's summary:代碼很精簡, 不錯, 功能 實現(xiàn)的也是正確 的.....

Release Notes

Popular Entries