From e2ed46ba3da90d8974f541338e96d8059ed26ad3 Mon Sep 17 00:00:00 2001 From: chen Date: Sat, 26 Sep 2026 14:52:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(user):=20=E9=9A=90=E8=97=8F=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E4=BC=9A=E5=91=98=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=B9=B6=E7=A6=81=E7=94=A8=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/shopro/user/User.php | 36 +++++++------------ .../admin/view/shopro/user/user/index.html | 8 ----- public/assets/js/backend/shopro/user/user.js | 7 +--- 3 files changed, 14 insertions(+), 37 deletions(-) diff --git a/application/admin/controller/shopro/user/User.php b/application/admin/controller/shopro/user/User.php index d8b812d..32bbda5 100644 --- a/application/admin/controller/shopro/user/User.php +++ b/application/admin/controller/shopro/user/User.php @@ -283,35 +283,25 @@ class User extends Common } /** - * 删除用户(支持批量) + * 删除用户(已禁用) * * @param $id * @return \think\Response */ - public function delete($id) + public function delete($id = null) { - operate_filter(); + $this->error('会员数据涉及资产与团队层级关系,系统已禁用删除功能'); + } - if (empty($id)) { - $this->error(__('Parameter %s can not be empty', 'id')); - } - - $id = explode(',', $id); - $list = $this->model->where('id', 'in', $id)->select(); - $result = Db::transaction(function () use ($list) { - $count = 0; - foreach ($list as $item) { - $count += $item->delete(); - } - - return $count; - }); - - if ($result) { - $this->success('删除成功', null, $result); - } else { - $this->error(__('No rows were deleted')); - } + /** + * 删除用户(已禁用) + * + * @param $ids + * @return \think\Response + */ + public function del($ids = null) + { + $this->error('会员数据涉及资产与团队层级关系,系统已禁用删除功能'); } public function recharge() diff --git a/application/admin/view/shopro/user/user/index.html b/application/admin/view/shopro/user/user/index.html index 6dc1067..3d0a337 100644 --- a/application/admin/view/shopro/user/user/index.html +++ b/application/admin/view/shopro/user/user/index.html @@ -180,14 +180,6 @@ 充值 {/if} - - - diff --git a/public/assets/js/backend/shopro/user/user.js b/public/assets/js/backend/shopro/user/user.js index 159ed75..b93b9ba 100644 --- a/public/assets/js/backend/shopro/user/user.js +++ b/public/assets/js/backend/shopro/user/user.js @@ -227,12 +227,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin } function onDelete(id) { - Fast.api.ajax({ - url: `shopro/user/user/delete/id/${id}`, - type: 'DELETE', - }, function (ret, res) { - getData() - }, function (ret, res) { }) + Fast.api.msg('会员数据涉及资产与团队层级关系,禁止删除'); } onMounted(() => {