fix(user): 隐藏后台会员删除按钮并禁用删除接口
这个提交包含在:
@@ -283,35 +283,25 @@ class User extends Common
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除用户(支持批量)
|
* 删除用户(已禁用)
|
||||||
*
|
*
|
||||||
* @param $id
|
* @param $id
|
||||||
* @return \think\Response
|
* @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'));
|
* 删除用户(已禁用)
|
||||||
}
|
*
|
||||||
|
* @param $ids
|
||||||
$id = explode(',', $id);
|
* @return \think\Response
|
||||||
$list = $this->model->where('id', 'in', $id)->select();
|
*/
|
||||||
$result = Db::transaction(function () use ($list) {
|
public function del($ids = null)
|
||||||
$count = 0;
|
{
|
||||||
foreach ($list as $item) {
|
$this->error('会员数据涉及资产与团队层级关系,系统已禁用删除功能');
|
||||||
$count += $item->delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $count;
|
|
||||||
});
|
|
||||||
|
|
||||||
if ($result) {
|
|
||||||
$this->success('删除成功', null, $result);
|
|
||||||
} else {
|
|
||||||
$this->error(__('No rows were deleted'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function recharge()
|
public function recharge()
|
||||||
|
|||||||
@@ -180,14 +180,6 @@
|
|||||||
充值
|
充值
|
||||||
</el-button>
|
</el-button>
|
||||||
{/if}
|
{/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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -227,12 +227,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onDelete(id) {
|
function onDelete(id) {
|
||||||
Fast.api.ajax({
|
Fast.api.msg('会员数据涉及资产与团队层级关系,禁止删除');
|
||||||
url: `shopro/user/user/delete/id/${id}`,
|
|
||||||
type: 'DELETE',
|
|
||||||
}, function (ret, res) {
|
|
||||||
getData()
|
|
||||||
}, function (ret, res) { })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户