mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-12-18 10:25:54 +01:00
12 lines
235 B
JavaScript
12 lines
235 B
JavaScript
export function mockAPI({ imitate = {}, delay = 500 } = {}) {
|
|
return new Promise((resolve) => {
|
|
setTimeout(() => {
|
|
resolve({
|
|
code: '0000',
|
|
data: imitate,
|
|
success: true,
|
|
})
|
|
}, delay)
|
|
})
|
|
}
|