正在显示
1 个修改的文件
包含
10 行增加
和
1 行删除
@@ -8,7 +8,16 @@ class GiftController extends AdminBaseController { | @@ -8,7 +8,16 @@ class GiftController extends AdminBaseController { | ||
8 | public function index() { | 8 | public function index() { |
9 | $request = request(); | 9 | $request = request(); |
10 | if($request->isPost()) { | 10 | if($request->isPost()) { |
11 | - | 11 | + $data = [ |
12 | + 'id' => 1, | ||
13 | + 'overflow' => $request->param('overflow'), | ||
14 | + 'reduce' => $request->param('reduce') | ||
15 | + ]; | ||
16 | + if(Db::name('gift')->update($data)) { | ||
17 | + $this->success('修改成功'); | ||
18 | + }else { | ||
19 | + $this->error('您未作出任何修改'); | ||
20 | + } | ||
12 | }else { | 21 | }else { |
13 | return $this->fetch('gift', [ | 22 | return $this->fetch('gift', [ |
14 | 'data' => Db::name('gift')->where(['id'=>1])->find() | 23 | 'data' => Db::name('gift')->where(['id'=>1])->find() |
-
请 注册 或 登录 后发表评论