人工放行

This commit is contained in:
2025-07-18 13:41:06 +08:00
parent 218b8ae36c
commit c672c0c1ee
3 changed files with 48 additions and 4 deletions

19
utils/utils.js Normal file
View File

@@ -0,0 +1,19 @@
export function confirmAction(title = "确认操作", content = "确定要执行此操作吗?", confirmCallback) {
return new Promise((resolve, reject) => {
uni.showModal({
title: title,
content: content,
showCancel: true,
success: (res) => {
if (res.confirm) {
resolve(true); // 调用确认回调
if (confirmCallback) {
confirmCallback();
}
} else if (res.cancel) {
resolve(false);
}
}
});
});
}