From fb0eb1140cfb3590108abd78af4524ab56fad0dc Mon Sep 17 00:00:00 2001 From: duqingquan Date: Mon, 26 Jun 2023 18:23:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0console.log=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 9 ++++ pages/SyntaxCase/consoleTest.vue | 48 +++++++++++++++++++ pages/advance/advance.vue | 15 +++++- .../uts-advance/utssdk/app-android/index.uts | 42 +++++++++++++++- 4 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 pages/SyntaxCase/consoleTest.vue diff --git a/pages.json b/pages.json index 17bf47b..cc43ba6 100644 --- a/pages.json +++ b/pages.json @@ -152,6 +152,15 @@ "enablePullDownRefresh": false } + }, + { + "path" : "pages/SyntaxCase/consoleTest", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + } diff --git a/pages/SyntaxCase/consoleTest.vue b/pages/SyntaxCase/consoleTest.vue new file mode 100644 index 0000000..97d4436 --- /dev/null +++ b/pages/SyntaxCase/consoleTest.vue @@ -0,0 +1,48 @@ + + + + + \ No newline at end of file diff --git a/pages/advance/advance.vue b/pages/advance/advance.vue index 24d5594..acb6737 100644 --- a/pages/advance/advance.vue +++ b/pages/advance/advance.vue @@ -26,6 +26,8 @@ + + @@ -51,7 +53,7 @@ - + @@ -72,7 +74,8 @@ doIntervalTask, clearIntervalTask, playAssetAudio, - getMetaConfig + getMetaConfig, + quitApp } from "../../uni_modules/uts-advance"; @@ -158,6 +161,9 @@ console.log(res); }); }, + testQuitApp(){ + quitApp() + }, testMetaRead() { let ret = getMetaConfig(); @@ -187,6 +193,11 @@ url: '/pages/SyntaxCase/paramTest' }) }, + testConsole: function() { + uni.navigateTo({ + url: '/pages/SyntaxCase/consoleTest' + }) + }, testGetResourcePath: function() { uni.navigateTo({ url: '/pages/advance/iOS/getResourcePath' diff --git a/uni_modules/uts-advance/utssdk/app-android/index.uts b/uni_modules/uts-advance/utssdk/app-android/index.uts index 67e3c73..3eb570c 100644 --- a/uni_modules/uts-advance/utssdk/app-android/index.uts +++ b/uni_modules/uts-advance/utssdk/app-android/index.uts @@ -415,4 +415,44 @@ export function callbackParam(callback : ParamCallback) { array: ['4', '5', '6'] } callback(ret) -} \ No newline at end of file +} +/** + * 打印测试方法 + */ +export function logStrTest() { + console.log("logStrTest 字符串打印测试") +} + +export function logFloatTest() { + console.log(3.1415926) +} +export function logIntTest() { + console.log(2023) +} + +export function logObjectTest(){ + let ret : ParamOptions = { + title: "logObjectTest", + array: ['1', '2', '3'] + } + console.log(ret) +} + + +export function logFunctionTest(){ + + let testFun = function(){ + console.log("testFun") + } + console.log(testFun) +} + +/** + * + */ +export function quitApp(){ + UTSAndroid.quitApp() +} + + + -- GitLab