From 9f9d0ec7cd5851127004d64d9a468874e77bc8ea Mon Sep 17 00:00:00 2001 From: mahaifeng Date: Sat, 14 Sep 2024 12:49:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E9=81=BF=E5=85=8DiOS=E7=BC=96=E8=AF=91=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-syntaxcase/utssdk/index.uts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/uni_modules/uts-syntaxcase/utssdk/index.uts b/uni_modules/uts-syntaxcase/utssdk/index.uts index d84bac0..26b5c9c 100644 --- a/uni_modules/uts-syntaxcase/utssdk/index.uts +++ b/uni_modules/uts-syntaxcase/utssdk/index.uts @@ -52,11 +52,17 @@ export function testSyncWithCallback(opts : AsyncOptions) : SyntaxResult { async function testAwaitPromise(res : SyntaxResult) : Promise { - return await new Promise(function (resolve : (res : SyntaxResult) => void) { - setTimeout(() => { - resolve(res) - }, 2000) - }) + // #ifdef APP-ANDROID + return await new Promise(function (resolve : (res : SyntaxResult) => void) { + resolve(res) + setTimeout(() => { + resolve(res) + }, 2000) + }) + // #endif + // #ifndef APP-ANDROID + return res + // #endif } /** * 导出一个异步方法 -- GitLab