使用js捕获async异常 const unity = (promise) => { return promise.then((res) => [null, res]).catch((err) => [err]); }; let [_err, _res] = await unity(异步请求);