From 4b1e7ee6c64a8a195ac33eb622ea1673d97fafc3 Mon Sep 17 00:00:00 2001 From: zhaocheng <578322713@qq.com> Date: Wed, 6 Nov 2019 17:56:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=90=8E=E7=AB=AF=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=20admin=20=E6=9D=83=E9=99=90=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/controllers/InsurerController.php | 4 +++- frontend/views/insurer/my-list-info.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/controllers/InsurerController.php b/frontend/controllers/InsurerController.php index 2bee5f9..980d2f9 100644 --- a/frontend/controllers/InsurerController.php +++ b/frontend/controllers/InsurerController.php @@ -3512,7 +3512,7 @@ class InsurerController extends BaseController $result['success'] = false; $result['msg'] = '保存失败'; - if ($request->isPost) { + if ($request->isPost && $this->my->id == 1) { $id = $request->post('order_id', 0); $order_info = OrderT::findOne($id); @@ -3537,6 +3537,8 @@ class InsurerController extends BaseController $tran->rollBack(); $result['msg'] = $e->getMessage(); } + }else { + $result['msg'] = '当前用户无此权限'; } return $result; } diff --git a/frontend/views/insurer/my-list-info.php b/frontend/views/insurer/my-list-info.php index ddcaa1e..5af01b9 100644 --- a/frontend/views/insurer/my-list-info.php +++ b/frontend/views/insurer/my-list-info.php @@ -350,7 +350,7 @@ use common\models\PriceT; // }); }); - + gift_status == 1 && $my_id == 1) { ?> $('.btn-cancel').click(function () { parent.layer.confirm('此操作将回滚礼品状态,删除已生成礼物记录,确定继续?', { btn: ['确认','取消'], //按钮 @@ -364,6 +364,7 @@ use common\models\PriceT; // }); }); + }); endBlock(); ?>