From 7c71b6c44a0945213c4bab9e91f4db5fe548a3c2 Mon Sep 17 00:00:00 2001 From: yanyilin Date: Thu, 13 Oct 2022 17:19:51 +0800 Subject: [PATCH] =?UTF-8?q?uts-helloworld=E7=A4=BA=E4=BE=8B=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E8=B0=83=E6=95=B4=E5=85=B1=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uts-helloworld/utssdk/app-ios/index.uts | 46 ------------------- .../utssdk/{app-android => }/index.uts | 0 2 files changed, 46 deletions(-) delete mode 100644 uni_modules/uts-helloworld/utssdk/app-ios/index.uts rename uni_modules/uts-helloworld/utssdk/{app-android => }/index.uts (100%) diff --git a/uni_modules/uts-helloworld/utssdk/app-ios/index.uts b/uni_modules/uts-helloworld/utssdk/app-ios/index.uts deleted file mode 100644 index e42147d..0000000 --- a/uni_modules/uts-helloworld/utssdk/app-ios/index.uts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * json参数格式定义 - */ -type inputJSON = { - inputText: string, - errCode: number -} -/** - * json入参格式 - */ -type JsonParamOptions = { - input: inputJSON; - success: (res: string) => void; - fail: (res: string) => void; - complete: (res: string) => void; -}; - - -/** - * 导出无参的UTS函数 - * @param opts - */ -export function callWithoutParam(success: () => void) { - success(); - return { name: "doSthWithCallback" }; -} - -/** - * 导出一个字符串入参的UTS函数 - */ -export function callWithStringParam(input: string, success: (res: string) => void) { - success(input); - return { name: "doSthWithCallback" }; -} - -/** - * 导出一个JSON入参的UTS函数 - */ -export function callWithJSONParam(opts: JsonParamOptions) { - opts.input.errCode = 10; - opts.success(opts.input); - return { name: "doSthWithCallback" }; -} - - - diff --git a/uni_modules/uts-helloworld/utssdk/app-android/index.uts b/uni_modules/uts-helloworld/utssdk/index.uts similarity index 100% rename from uni_modules/uts-helloworld/utssdk/app-android/index.uts rename to uni_modules/uts-helloworld/utssdk/index.uts -- GitLab