提交物业报修模块

This commit is contained in:
zlwu committed 2025-06-30 20:33:58 +08:00
1 parent 60cb1b09f8
commit 2371080245
597 files changed
+100361 -4145

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import utils from "../utils.js";
const callbackify = (fn, reducer) => {
return utils.isAsyncFn(fn) ? function (...args) {
const cb = args.pop();
fn.apply(this, args).then((value) => {
try {
reducer ? cb(null, ...reducer(value)) : cb(null, value);
} catch (err) {
cb(err);
}
}, cb);
} : fn;
}
export default callbackify;