admin的数据库文件补全,修复uvue中的数据库接入bug

This commit is contained in:
comlibmb
2026-02-25 10:02:50 +08:00
parent 5d00e3d74e
commit dc8f899610
40 changed files with 1629 additions and 625 deletions

View File

@@ -187,14 +187,21 @@ async function handleSave() {
async function onDelete(item : AdminRole) {
uni.showModal({
title: '提示',
content: `确定要删除角色 "${item.name}" 吗?`,
title: '删除确认',
content: `确定要删除角色 "${item.name}" 吗?\n\n⚠ 警告:该操作将同时解除所有关联管理员的身份并清空该角色的权限配置!`,
confirmText: '确认删除',
confirmColor: '#ff4d4f',
success: async (res) => {
if (res.confirm) {
const ok = await deleteRole(item.id)
if (ok) {
uni.showToast({ title: '删除成功' })
loadData()
try {
const ok = await deleteRole(item.id)
if (ok) {
uni.showToast({ title: '删除成功' })
loadData()
}
} catch (e: any) {
const errMsg = e?.message || '删除失败'
uni.showToast({ title: errMsg, icon: 'none', duration: 3000 })
}
}
}