From 89321c19fedfbb372896ca4c36232df39fc5f9a6 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Tue, 10 Oct 2023 14:58:57 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=20onLoad.test.js=20?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=20lifeCycleNum=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 18 ++++++++++++------ pages/API/navigator/new-page/new-page-3.uvue | 5 +++++ pages/API/navigator/new-page/onLoad.test.js | 2 +- pages/API/navigator/new-page/onLoad.uvue | 6 +++--- 4 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 pages/API/navigator/new-page/new-page-3.uvue diff --git a/pages.json b/pages.json index 12a7091a..7159ff34 100644 --- a/pages.json +++ b/pages.json @@ -256,12 +256,18 @@ "navigationBarTitleText": "新页面-1" } }, - { - "path": "pages/API/navigator/new-page/new-page-2", - "style": { - "navigationBarTitleText": "新页面-2", - "enablePullDownRefresh": true - } + { + "path": "pages/API/navigator/new-page/new-page-2", + "style": { + "navigationBarTitleText": "新页面-2", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/API/navigator/new-page/new-page-3", + "style": { + "navigationBarTitleText": "新页面-3" + } }, { "path": "pages/API/navigator/new-page/onLoad", diff --git a/pages/API/navigator/new-page/new-page-3.uvue b/pages/API/navigator/new-page/new-page-3.uvue new file mode 100644 index 00000000..442607b6 --- /dev/null +++ b/pages/API/navigator/new-page/new-page-3.uvue @@ -0,0 +1,5 @@ + diff --git a/pages/API/navigator/new-page/onLoad.test.js b/pages/API/navigator/new-page/onLoad.test.js index 853d8d27..933193ac 100644 --- a/pages/API/navigator/new-page/onLoad.test.js +++ b/pages/API/navigator/new-page/onLoad.test.js @@ -1,7 +1,7 @@ jest.setTimeout(20000); const PAGE_PATH = "/pages/API/navigator/new-page/onLoad"; const INTERMEDIATE_PAGE_PATH = "/pages/API/navigator/new-page/new-page-1"; -const TARGET_PAGE_PATH = "/pages/API/navigator/new-page/new-page-2"; +const TARGET_PAGE_PATH = "/pages/API/navigator/new-page/new-page-3"; let page; describe("onLoad", () => { diff --git a/pages/API/navigator/new-page/onLoad.uvue b/pages/API/navigator/new-page/onLoad.uvue index bab65d35..083dfcca 100644 --- a/pages/API/navigator/new-page/onLoad.uvue +++ b/pages/API/navigator/new-page/onLoad.uvue @@ -61,7 +61,7 @@ export default { }, navigateTo(){ uni.navigateTo({ - url: '/pages/API/navigator/new-page/new-page-2' + url: '/pages/API/navigator/new-page/new-page-3' }) }, navigateBack(){ @@ -69,12 +69,12 @@ export default { }, redirectTo(){ uni.redirectTo({ - url: '/pages/API/navigator/new-page/new-page-2' + url: '/pages/API/navigator/new-page/new-page-3' }) }, reLaunch(){ uni.reLaunch({ - url: '/pages/API/navigator/new-page/new-page-2' + url: '/pages/API/navigator/new-page/new-page-3' }) }, switchTab(){ -- GitLab