mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改数据字段
This commit is contained in:
parent
e3bc5043ff
commit
5e2725ad9f
@ -11,6 +11,19 @@ use think\admin\Controller;
|
|||||||
*/
|
*/
|
||||||
class Data extends Controller
|
class Data extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定数据对象
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
*/
|
||||||
|
public function getData()
|
||||||
|
{
|
||||||
|
$data = $this->_vali(['name.require' => '数据名称不能为空!']);
|
||||||
|
$this->success('获取数据对象', sysdata($data['name']));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取轮播图片数据
|
* 获取轮播图片数据
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
@ -20,7 +33,7 @@ class Data extends Controller
|
|||||||
public function getSlider()
|
public function getSlider()
|
||||||
{
|
{
|
||||||
$data = sysdata(input('keys', 'slider'));
|
$data = sysdata(input('keys', 'slider'));
|
||||||
$this->success('获取轮播图片数据', $data);
|
$this->success('获取轮播图片', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,6 +49,6 @@ class Data extends Controller
|
|||||||
if (($id = input('id')) > 0) {
|
if (($id = input('id')) > 0) {
|
||||||
$this->app->db->name('BaseUserMessage')->where(['id' => $id])->inc('num_read')->update();
|
$this->app->db->name('BaseUserMessage')->where(['id' => $id])->inc('num_read')->update();
|
||||||
}
|
}
|
||||||
$this->success('获取系统通知数据', $result);
|
$this->success('获取系统通知', $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user