fix(user): 隐藏后台会员删除按钮并禁用删除接口
这个提交包含在:
@@ -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()
|
||||
|
||||
@@ -180,14 +180,6 @@
|
||||
充值
|
||||
</el-button>
|
||||
{/if}
|
||||
<el-popconfirm width="fit-content" confirm-button-text="确认" cancel-button-text="取消"
|
||||
title="确认删除该会员记录?" @confirm="onDelete(scope.row.id)">
|
||||
<template #reference>
|
||||
{if $auth->check('shopro/user/user/delete')}
|
||||
<el-button type="danger" link>删除</el-button>
|
||||
{/if}
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
在新工单中引用
屏蔽一个用户