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(); ?>