feat: 添加重置交易密码功能,允许管理员重置用户交易密码并提示成功信息
This commit is contained in:
@@ -102,6 +102,28 @@ const columns: TableBaseColumns = [
|
|||||||
content: () => h(Withdraw, { userId: row.userId })
|
content: () => h(Withdraw, { userId: row.userId })
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
contentText: '重置交易密码',
|
||||||
|
size: 'small',
|
||||||
|
onClick: () => {
|
||||||
|
dialog.warning({
|
||||||
|
title: '重置交易密码',
|
||||||
|
content: '确认重置该用户的交易密码为初始密码123456吗?',
|
||||||
|
positiveText: '确认重置',
|
||||||
|
negativeText: '取消',
|
||||||
|
onPositiveClick: async () => {
|
||||||
|
const { data } = await safeClient(() =>
|
||||||
|
client.api.admin.user_security({ userId: row.userId })['transaction-password'].reset.post()
|
||||||
|
);
|
||||||
|
|
||||||
|
dialog.success({
|
||||||
|
title: '操作成功',
|
||||||
|
content: `该用户的交易密码已重置为初始密码 ${data.value?.password},请妥善告知用户。`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user