|
|
<?php
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | Author: 小夏 < 449134904@qq.com>
|
|
|
// +----------------------------------------------------------------------
|
|
|
namespace app\admin\controller;
|
|
|
|
|
|
use cmf\controller\AdminBaseController;
|
|
|
use app\admin\model\AboutUsModel;
|
|
|
use think\Db;
|
|
|
|
|
|
class SysInformationController extends AdminBaseController
|
|
|
{
|
|
|
//编辑页面
|
|
|
public function edit(){
|
|
|
$res = Db::name('about_us')->where(['id'=>1])->field('id,information')->find();
|
|
|
$this->assign('post', $res);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//编辑保存页面
|
|
|
public function editPost(){
|
|
|
$data = $this->request->param();
|
|
|
$AboutUsModel = new AboutUsModel();
|
|
|
$AboutUsModel->allowField(true)->isUpdate(true)->save($data);
|
|
|
$this->success("保存成功!");
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|