提交 372c8572 authored 作者: 吴强's avatar 吴强

添加了身份证读卡

...@@ -117,6 +117,10 @@ export function filterValidParams(params) { ...@@ -117,6 +117,10 @@ export function filterValidParams(params) {
return _.pickBy(params, _.negate(_.isUndefined)); return _.pickBy(params, _.negate(_.isUndefined));
} }
export async function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export async function tryIt(times, cb, delay) { export async function tryIt(times, cb, delay) {
let err; let err;
for (let i = 0; i < times; ++i) { for (let i = 0; i < times; ++i) {
...@@ -132,4 +136,5 @@ export async function tryIt(times, cb, delay) { ...@@ -132,4 +136,5 @@ export async function tryIt(times, cb, delay) {
if (err) { if (err) {
throw err; throw err;
} }
}; }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论